aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfamosss <zzq09494@ly.com>2022-08-23 14:54:51 +0800
committerGitHub <noreply@github.com>2022-08-22 23:54:51 -0700
commit911475526cc41ba40436c1a0accabd2ba5aad68e (patch)
treeee8776602f6477ddc379ac91b474bf0258296e31
parent7eb15b19694e165a13bb59b0c18f89121b5d452f (diff)
downloadseaweedfs-911475526cc41ba40436c1a0accabd2ba5aad68e.tar.xz
seaweedfs-911475526cc41ba40436c1a0accabd2ba5aad68e.zip
fix: TestCommandEcBalanceSmall Unit test fails when CommandEnv is nil (#3497)
-rw-r--r--weed/shell/commands.go2
1 files changed, 1 insertions, 1 deletions
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 {