More verbose output for ssh scp command

pull/2110/head
Matt Rickard 2017-10-23 15:05:07 -07:00
parent fc84bfde0b
commit 998b01b3ba
1 changed files with 3 additions and 2 deletions

View File

@ -112,8 +112,9 @@ func (s *SSHRunner) Copy(f assets.CopyableFile) error {
}()
scpcmd := fmt.Sprintf("sudo scp -t %s", f.GetTargetDir())
if err := sess.Run(scpcmd); err != nil {
return errors.Wrapf(err, "Error running scp command: %s", scpcmd)
out, err := sess.CombinedOutput(scpcmd)
if err != nil {
return errors.Wrapf(err, "Error running scp command: %s output: %s", scpcmd, out)
}
wg.Wait()