Skip to content

Commit

Permalink
Merge pull request #55 from timrspratt/main
Browse files Browse the repository at this point in the history
uppercase port option for scp
  • Loading branch information
freekmurze authored Nov 24, 2021
2 parents 6f0233e + 440b3c7 commit 2e44365
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Ssh.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,15 @@ public function upload(string $sourcePath, string $destinationPath): Process

protected function getExtraScpOptions(): string
{
$extraOptions = $this->getExtraOptions();
$extraOptions = $this->extraOptions;

if (isset($extraOptions['port'])) {
$extraOptions['port'] = str_replace('-p', '-P', $extraOptions['port']);
}

$extraOptions[] = '-r';

return implode(' ', $extraOptions);
return implode(' ', array_values($extraOptions));
}

private function getExtraOptions(): array
Expand Down

0 comments on commit 2e44365

Please sign in to comment.