Skip to content

Commit 6f59f9d

Browse files
andyzhangxbrahmaroutu
authored andcommitted
fix: return error with fewer mount options on Windows
1 parent 89fac93 commit 6f59f9d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mount_windows.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ func (mounter *Mounter) MountSensitive(source string, target string, fstype stri
8484
allOptions = append(allOptions, options...)
8585
allOptions = append(allOptions, sensitiveOptions...)
8686
if len(allOptions) < 2 {
87-
klog.Warningf("mount options(%q) command number(%d) less than 2, source:%q, target:%q, skip mounting",
87+
return fmt.Errorf("mount options(%q) should have at least 2 options, current number:%d, source:%q, target:%q",
8888
sanitizedOptionsForLogging, len(allOptions), source, target)
89-
return nil
9089
}
9190

9291
// currently only cifs mount is supported

0 commit comments

Comments
 (0)