1
0
Fork 0

Treat any SCP output as an error

timestamps
dump_stack() 2023-02-15 11:45:25 +00:00
parent 9910921e30
commit 3d6961dfd7
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
1 changed files with 1 additions and 1 deletions

View File

@ -372,7 +372,7 @@ func (q System) scp(user, localPath, remotePath string, recursive bool) (err err
cmd := exec.Command("scp", args...)
output, err := cmd.CombinedOutput()
if err != nil {
if err != nil || string(output) != "" {
return errors.New(string(output))
}