remote-exec (ssh): checking chmod command

This commit is contained in:
Luke Amdor 2015-05-04 15:43:38 -05:00
parent 15dc4b614c
commit 11b4060fee
1 changed files with 5 additions and 0 deletions

View File

@ -238,6 +238,11 @@ func (c *Communicator) UploadScript(path string, input io.Reader) error {
"machine: %s", err)
}
cmd.Wait()
if cmd.ExitStatus != 0 {
return fmt.Errorf(
"Error chmodding script file to 0777 in remote "+
"machine: exit status=%s", cmd.ExitStatus)
}
return nil
}