Skip to content

Commit

Permalink
feat: exit code 2 on invalid master password
Browse files Browse the repository at this point in the history
  • Loading branch information
hazcod authored Nov 11, 2021
1 parent ab08be3 commit 0c57602
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/enpasscli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ func main() {
vault.Logger.SetLevel(logger.Level)

if err := vault.Initialize(*vaultPath, *keyFilePath, masterPassword); err != nil {
logger.WithError(err).Fatal("could not open vault")
logger.WithError(err).Error("could not open vault")
os.Exit(2)
}
defer func() { _ = vault.Close() }()
vault.Logger.SetLevel(logLevel)
Expand Down

0 comments on commit 0c57602

Please sign in to comment.