Skip to content

Commit

Permalink
Add sshfs command stderr output into err message
Browse files Browse the repository at this point in the history
It should be better to output the command's full output instead of an exit code -1.
  • Loading branch information
athurg authored and vieux committed May 2, 2018
1 parent c6c54c1 commit e3916d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ func (d *sshfsDriver) mountVolume(v *sshfsVolume) error {
}

logrus.Debug(cmd.Args)
return cmd.Run()
output,err := cmd.CombinedOutput()
if err != nil {
return logError("sshfs command execute failed: %s ( %s )", err, string(output))
}
return nil
}

func (d *sshfsDriver) unmountVolume(target string) error {
Expand Down

0 comments on commit e3916d9

Please sign in to comment.