Fix Apple remote wrapper shell transport
This commit is contained in:
@@ -46,8 +46,8 @@ repository_url=$repositoryLiteral
|
|||||||
branch_name=$branchLiteral
|
branch_name=$branchLiteral
|
||||||
presets=$presetLiteral
|
presets=$presetLiteral
|
||||||
|
|
||||||
case "$remote_dir" in
|
case "`$remote_dir" in
|
||||||
"~/"*) remote_dir="$HOME/${remote_dir#~/}" ;;
|
"~/"*) remote_dir="`$HOME/`$(printf '%s' "`$remote_dir" | sed 's|^~/||')" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
mkdir -p "`$(dirname "`$remote_dir")"
|
mkdir -p "`$(dirname "`$remote_dir")"
|
||||||
@@ -87,5 +87,7 @@ tail -n 80 "`$log"
|
|||||||
exit "`$exit_code"
|
exit "`$exit_code"
|
||||||
"@
|
"@
|
||||||
|
|
||||||
$remoteScript | & ssh -o BatchMode=yes $HostName "sh -s"
|
$remoteScript = $remoteScript -replace "`r`n", "`n"
|
||||||
|
$encodedRemoteScript = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($remoteScript))
|
||||||
|
& ssh -o BatchMode=yes $HostName "printf '%s' '$encodedRemoteScript' | base64 -D | sh"
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
Reference in New Issue
Block a user