1
0

Treat any SCP output as an error

This commit is contained in:
dump_stack() 2023-02-15 11:45:25 +00:00
parent 9910921e30
commit 3d6961dfd7
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

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