aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_delete.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_volume_delete.go')
-rw-r--r--weed/shell/command_volume_delete.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_volume_delete.go b/weed/shell/command_volume_delete.go
index 4297b669b..135ad7285 100644
--- a/weed/shell/command_volume_delete.go
+++ b/weed/shell/command_volume_delete.go
@@ -31,10 +31,6 @@ func (c *commandVolumeDelete) Help() string {
func (c *commandVolumeDelete) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
- if err = commandEnv.confirmIsLocked(); err != nil {
- return
- }
-
volDeleteCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
volumeIdInt := volDeleteCommand.Int("volumeId", 0, "the volume id")
nodeStr := volDeleteCommand.String("node", "", "the volume server <host>:<port>")
@@ -42,6 +38,10 @@ func (c *commandVolumeDelete) Do(args []string, commandEnv *CommandEnv, writer i
return nil
}
+ if err = commandEnv.confirmIsLocked(); err != nil {
+ return
+ }
+
sourceVolumeServer := pb.ServerAddress(*nodeStr)
volumeId := needle.VolumeId(*volumeIdInt)