From 911475526cc41ba40436c1a0accabd2ba5aad68e Mon Sep 17 00:00:00 2001 From: famosss Date: Tue, 23 Aug 2022 14:54:51 +0800 Subject: [PATCH] fix: TestCommandEcBalanceSmall Unit test fails when CommandEnv is nil (#3497) --- weed/shell/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/shell/commands.go b/weed/shell/commands.go index 15e6e06c2..e703aad01 100644 --- a/weed/shell/commands.go +++ b/weed/shell/commands.go @@ -83,7 +83,7 @@ func (ce *CommandEnv) confirmIsLocked(args []string) error { } func (ce *CommandEnv) isLocked() bool { - return ce.locker.IsLocked() + return ce != nil && ce.locker.IsLocked() } func (ce *CommandEnv) checkDirectory(path string) error {