Skip to content

Commit

Permalink
Merge pull request #104 from leevigraham/patch-1
Browse files Browse the repository at this point in the history
Update Ssh.php
  • Loading branch information
Nielsvanpach authored Oct 18, 2024
2 parents 3fc8d0a + 12070c7 commit 77dbc9b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Ssh.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,18 @@ public function getExecuteCommand($command): string
{
$commands = $this->wrapArray($command);

$extraOptions = implode(' ', $this->getExtraOptions());

$commandString = implode(PHP_EOL, $commands);

$delimiter = 'EOF-SPATIE-SSH';

$target = $this->getTargetForSsh();

if (in_array($this->host, ['local', 'localhost', '127.0.0.1'])) {
return $commandString;
}

$extraOptions = implode(' ', $this->getExtraOptions());

$target = $this->getTargetForSsh();

$delimiter = 'EOF-SPATIE-SSH';

$bash = $this->addBash ? "'bash -se'" : '';

return "ssh {$extraOptions} {$target} {$bash} << \\$delimiter".PHP_EOL
Expand Down

0 comments on commit 77dbc9b

Please sign in to comment.