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