diff options
Diffstat (limited to 'weed/shell/command_volume_unmount.go')
| -rw-r--r-- | weed/shell/command_volume_unmount.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_volume_unmount.go b/weed/shell/command_volume_unmount.go index 5fc158b76..065cbf227 100644 --- a/weed/shell/command_volume_unmount.go +++ b/weed/shell/command_volume_unmount.go @@ -35,10 +35,6 @@ func (c *commandVolumeUnmount) Help() string { func (c *commandVolumeUnmount) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { - if err = commandEnv.confirmIsLocked(); err != nil { - return - } - volUnmountCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) volumeIdInt := volUnmountCommand.Int("volumeId", 0, "the volume id") nodeStr := volUnmountCommand.String("node", "", "the volume server <host>:<port>") @@ -46,6 +42,10 @@ func (c *commandVolumeUnmount) Do(args []string, commandEnv *CommandEnv, writer return nil } + if err = commandEnv.confirmIsLocked(); err != nil { + return + } + sourceVolumeServer := pb.ServerAddress(*nodeStr) volumeId := needle.VolumeId(*volumeIdInt) |
