From bcaf7f7ba70d2fdfed615fcab977628efdafaec9 Mon Sep 17 00:00:00 2001 From: aqche <39076898+aqche@users.noreply.github.com> Date: Mon, 11 Nov 2019 15:24:53 -0800 Subject: [PATCH] states/statemgr: Properly return error when Unlock detects invalid lock id --- states/statemgr/filesystem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/states/statemgr/filesystem.go b/states/statemgr/filesystem.go index 8338e5741..541108dde 100644 --- a/states/statemgr/filesystem.go +++ b/states/statemgr/filesystem.go @@ -336,7 +336,7 @@ func (s *Filesystem) Unlock(id string) error { idErr := fmt.Errorf("invalid lock id: %q. current id: %q", id, s.lockID) info, err := s.lockInfo() if err != nil { - err = multierror.Append(idErr, err) + idErr = multierror.Append(idErr, err) } return &LockError{