Skip to content

Commit

Permalink
Fix nil error issue, Resolves #242
Browse files Browse the repository at this point in the history
  • Loading branch information
bitcodr authored and ebiggers committed Aug 9, 2020
1 parent 95ad486 commit 5e85ae0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/fscrypt/commands.go
Expand Up @@ -993,6 +993,9 @@ func addProtectorAction(c *cli.Context) error {
}
// Sanity check before unlocking everything
if err := policy.AddProtector(protector); errors.Cause(err) != actions.ErrLocked {
if err == nil {
err = errors.New("policy and protector are not locked")
}
return newExitError(c, err)
}

Expand Down

0 comments on commit 5e85ae0

Please sign in to comment.