From 119d5908dd52b159c275bad10007daaf62188df0 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 13 Sep 2021 22:13:34 -0700 Subject: shell: do not need to lock to see volume -h --- weed/shell/command_ec_encode.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'weed/shell/command_ec_encode.go') diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go index fd01ac700..33eef9ca7 100644 --- a/weed/shell/command_ec_encode.go +++ b/weed/shell/command_ec_encode.go @@ -55,10 +55,6 @@ func (c *commandEcEncode) Help() string { func (c *commandEcEncode) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { - if err = commandEnv.confirmIsLocked(); err != nil { - return - } - encodeCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) volumeId := encodeCommand.Int("volumeId", 0, "the volume id") collection := encodeCommand.String("collection", "", "the collection name") @@ -69,6 +65,10 @@ func (c *commandEcEncode) Do(args []string, commandEnv *CommandEnv, writer io.Wr return nil } + if err = commandEnv.confirmIsLocked(); err != nil { + return + } + vid := needle.VolumeId(*volumeId) // volumeId is provided -- cgit v1.2.3