Skip to content
This repository was archived by the owner on Oct 19, 2022. It is now read-only.

Commit e3916d9

Browse files
athurgvieux
authored andcommitted
Add sshfs command stderr output into err message
It should be better to output the command's full output instead of an exit code -1.
1 parent c6c54c1 commit e3916d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,11 @@ func (d *sshfsDriver) mountVolume(v *sshfsVolume) error {
252252
}
253253

254254
logrus.Debug(cmd.Args)
255-
return cmd.Run()
255+
output,err := cmd.CombinedOutput()
256+
if err != nil {
257+
return logError("sshfs command execute failed: %s ( %s )", err, string(output))
258+
}
259+
return nil
256260
}
257261

258262
func (d *sshfsDriver) unmountVolume(target string) error {

0 commit comments

Comments
 (0)