im SO not the writer of this code

This commit is contained in:
lda
2026-04-06 16:28:23 +07:00 Unverified
parent 0048d5938e
commit 6f59c0c011
2 changed files with 46 additions and 15 deletions
+4 -2
View File
@@ -91,14 +91,16 @@ function Invoke-Scp {
if ($Recurse) { $arguments += '-r' }
if ($HostKey) { $arguments += @('-batch', '-hostkey', $HostKey) }
if ($Pass) { $arguments += @('-pw', $Pass) }
$arguments += @($Local, $Dest)
$arguments += @($Local)
$arguments += $Dest
Invoke-Ext -Exe $pscp.Path -Arguments $arguments -Label 'scp'
}
else {
$arguments = @('-O')
if ($Quiet) { $arguments += '-q' }
if ($Recurse) { $arguments += '-r' }
$arguments += @($Local, $Dest)
$arguments += @($Local)
$arguments += $Dest
Invoke-Ext -Exe 'scp' -Arguments $arguments -Label 'scp'
}
}