Merge pull request #1814 from svanharmelen/b-fix-small-vet-warning
Fixing a small vet warning introduced by PR #1796
This commit is contained in:
commit
0f40cebc0f
|
@ -229,8 +229,11 @@ func (c *Communicator) UploadScript(path string, input io.Reader) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var stdout, stderr bytes.Buffer
|
||||||
cmd := &remote.Cmd{
|
cmd := &remote.Cmd{
|
||||||
Command: fmt.Sprintf("chmod 0777 %s", path),
|
Command: fmt.Sprintf("chmod 0777 %s", path),
|
||||||
|
Stdout: &stdout,
|
||||||
|
Stderr: &stderr,
|
||||||
}
|
}
|
||||||
if err := c.Start(cmd); err != nil {
|
if err := c.Start(cmd); err != nil {
|
||||||
return fmt.Errorf(
|
return fmt.Errorf(
|
||||||
|
@ -241,7 +244,7 @@ func (c *Communicator) UploadScript(path string, input io.Reader) error {
|
||||||
if cmd.ExitStatus != 0 {
|
if cmd.ExitStatus != 0 {
|
||||||
return fmt.Errorf(
|
return fmt.Errorf(
|
||||||
"Error chmodding script file to 0777 in remote "+
|
"Error chmodding script file to 0777 in remote "+
|
||||||
"machine: exit status=%s", cmd.ExitStatus)
|
"machine %d: %s %s", cmd.ExitStatus, stdout.String(), stderr.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue