1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-28 21:31:56 +02:00

add some error messages for args

related to https://github.com/seaweedfs/seaweedfs/issues/4115
This commit is contained in:
chrislu 2023-02-10 12:30:53 -08:00
parent dc4ed2cd9b
commit 5520b81551

View file

@ -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