Update Client.php

This commit is contained in:
Anton Medvedev 2019-01-20 10:48:04 +07:00 committed by GitHub
parent bde7847461
commit 5fab2ecbe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,11 @@ class Client
$shellCommand = $host->getShellCommand(); $shellCommand = $host->getShellCommand();
$ssh = "ssh $sshArguments $host $become '$shellCommand; printf \"[exit_code:%s]\" $?;'"; if (strtolower(substr(PHP_OS, 0, 3)) === 'win') {
$ssh = "ssh $sshArguments $host $become \"$shellCommand; printf '[exit_code:%s]' $?;\"";
} else {
$ssh = "ssh $sshArguments $host $become '$shellCommand; printf \"[exit_code:%s]\" $?;'";
}
$process = new Process($ssh); $process = new Process($ssh);
$process $process