krz/keycask

Password manager: Swift core library, CLI for macOS/Linux/Windows, iOS/macOS app. cli password-manager swift

Commit 0dbdfe6644

0dbdfe6644f438e9d44b6f895bae3e11e9e1aeac

parent: f280f4008d

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-18 01:25 UTC

Exit 1 for unexpected errors

Layout: unified · split

Sources/keycask/main.swift +3 −2
@@ -14,9 +14,10 @@ do {
1414 fail(error.message, code: error.exitCode)
1515} catch {
1616 let text = Keycask.fullMessage(for: error)
17 if Keycask.exitCode(for: error).isSuccess {
17 let code = Keycask.exitCode(for: error)
18 if code.isSuccess {
1819 print(text)
1920 exit(0)
2021 }
21 fail(text, code: 2)
22 fail(text, code: code.rawValue == 64 ? 2 : 1)
2223}