From f0b4a7659a85d98121e4455b41e858fb6526a23f Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 23 Aug 2022 01:52:29 -0700 Subject: [PATCH] fix test --- weed/shell/commands.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/weed/shell/commands.go b/weed/shell/commands.go index e703aad01..87aeed2bb 100644 --- a/weed/shell/commands.go +++ b/weed/shell/commands.go @@ -83,7 +83,10 @@ func (ce *CommandEnv) confirmIsLocked(args []string) error { } func (ce *CommandEnv) isLocked() bool { - return ce != nil && ce.locker.IsLocked() + if ce == nil { + return true + } + return ce.locker.IsLocked() } func (ce *CommandEnv) checkDirectory(path string) error {