From 635bead75846782c38bff188c6e3fdde4dec893f Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 14 May 2026 01:30:59 +0800 Subject: [PATCH] fixup error messages --- baosign.ps1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/baosign.ps1 b/baosign.ps1 index c3f8ff587..24ad07fa4 100644 --- a/baosign.ps1 +++ b/baosign.ps1 @@ -123,14 +123,10 @@ function Copy-ToSSH { [string]$LocalPath, [string]$RemoteTarget ) - if (Test-Path $LocalPath) { try { - # Using scp for file transfer - $scpCommand = "scp `"$LocalPath`" `"$RemoteTarget`"" Write-Status " Copying: $LocalPath -> $RemoteTarget" - - $result = Invoke-Expression $scpCommand 2>&1 + $result = & scp $LocalPath $RemoteTarget 2>&1 if ($LASTEXITCODE -eq 0) { Write-Success " Successfully copied: $(Split-Path $LocalPath -Leaf)" return $true