Pipe script content through tr -d '\r' before execution

This commit is contained in:
2026-05-14 02:36:51 +08:00
parent c810f4ef6c
commit a89a43d402
+1 -1
View File
@@ -164,7 +164,7 @@ function Invoke-Run($Name, $Script) {
} }
$sa = Build-SshArgs $sa = Build-SshArgs
Write-Host ">>> Running $Script on $Name" -ForegroundColor Green Write-Host ">>> Running $Script on $Name" -ForegroundColor Green
Get-Content $sp -Raw | & ssh @sa "$HostUser@$HostIP" "bash -s" (Get-Content $sp -Raw) | & ssh @sa "$HostUser@$HostIP" "tr -d '\r' | bash -s"
} }
# ============================================================ # ============================================================