Skip to content

Commit

Permalink
Fix nil error issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bitcodr committed Aug 5, 2020
1 parent 0972347 commit 5c42d30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/fscrypt/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ func addProtectorAction(c *cli.Context) error {
return newExitError(c, err)
}
// Sanity check before unlocking everything
if err := policy.AddProtector(protector); errors.Cause(err) != actions.ErrLocked {
if err := policy.AddProtector(protector); err != nil && errors.Cause(err) != actions.ErrLocked {
return newExitError(c, err)
}

Expand Down

0 comments on commit 5c42d30

Please sign in to comment.