Treat any SCP output as an error
This commit is contained in:
parent
9910921e30
commit
3d6961dfd7
@ -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))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user