Show findmt command output in case of error

pull/6/head
Michal Fojtik 2018-01-15 13:02:31 +01:00
parent a698bc73eb
commit fd520aef61
No known key found for this signature in database
GPG Key ID: 172B61E538AAC0EE
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ func (n *NsenterMounter) IsLikelyNotMountPoint(file string) (bool, error) {
glog.V(5).Infof("nsenter findmnt args: %v", args) glog.V(5).Infof("nsenter findmnt args: %v", args)
out, err := n.ne.Exec("findmnt", args).CombinedOutput() out, err := n.ne.Exec("findmnt", args).CombinedOutput()
if err != nil { if err != nil {
glog.V(2).Infof("Failed findmnt command for path %s: %v", file, err) glog.V(2).Infof("Failed findmnt command for path %s: %s %v", file, out, err)
// Different operating systems behave differently for paths which are not mount points. // Different operating systems behave differently for paths which are not mount points.
// On older versions (e.g. 2.20.1) we'd get error, on newer ones (e.g. 2.26.2) we'd get "/". // On older versions (e.g. 2.20.1) we'd get error, on newer ones (e.g. 2.26.2) we'd get "/".
// It's safer to assume that it's not a mount point. // It's safer to assume that it's not a mount point.