aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-02-10 12:30:53 -0800
committerchrislu <chris.lu@gmail.com>2023-02-10 12:30:53 -0800
commit5520b81551bbb1e89ac8686b2aaf7d11b8401d98 (patch)
tree3337c865cea6eb5790d356ef6d9683aa990c078a
parentdc4ed2cd9b66ea390aa5d295fe6b841c9e79a5b2 (diff)
downloadseaweedfs-5520b81551bbb1e89ac8686b2aaf7d11b8401d98.tar.xz
seaweedfs-5520b81551bbb1e89ac8686b2aaf7d11b8401d98.zip
add some error messages for args
related to https://github.com/seaweedfs/seaweedfs/issues/4115
-rw-r--r--weed/shell/command_volume_unmount.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/shell/command_volume_unmount.go b/weed/shell/command_volume_unmount.go
index 7a649bb0e..3e0a768d5 100644
--- a/weed/shell/command_volume_unmount.go
+++ b/weed/shell/command_volume_unmount.go
@@ -41,6 +41,12 @@ func (c *commandVolumeUnmount) Do(args []string, commandEnv *CommandEnv, writer
if err = volUnmountCommand.Parse(args); err != nil {
return nil
}
+ if *nodeStr == "" {
+ return fmt.Errorf("-node option is required")
+ }
+ if *volumeIdInt == 0 {
+ return fmt.Errorf("-volumeId option is required")
+ }
if err = commandEnv.confirmIsLocked(args); err != nil {
return