Fix Apple remote wrapper shell transport

This commit is contained in:
2026-06-05 11:19:07 +02:00
parent 48f98d337b
commit ab3637af9c

View File

@@ -46,8 +46,8 @@ repository_url=$repositoryLiteral
branch_name=$branchLiteral
presets=$presetLiteral
case "$remote_dir" in
"~/"*) remote_dir="$HOME/${remote_dir#~/}" ;;
case "`$remote_dir" in
"~/"*) remote_dir="`$HOME/`$(printf '%s' "`$remote_dir" | sed 's|^~/||')" ;;
esac
mkdir -p "`$(dirname "`$remote_dir")"
@@ -87,5 +87,7 @@ tail -n 80 "`$log"
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