shell: do not need to lock to see volume -h
This commit is contained in:
@@ -37,16 +37,16 @@ func (c *commandVolumeServerLeave) Help() string {
|
||||
|
||||
func (c *commandVolumeServerLeave) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
if err = commandEnv.confirmIsLocked(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
vsLeaveCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
|
||||
volumeServer := vsLeaveCommand.String("node", "", "<host>:<port> of the volume server")
|
||||
if err = vsLeaveCommand.Parse(args); err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err = commandEnv.confirmIsLocked(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if *volumeServer == "" {
|
||||
return fmt.Errorf("need to specify volume server by -node=<host>:<port>")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user