summaryrefslogtreecommitdiff
path: root/internal/readpassword
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-05-14 14:02:08 +0200
committerJakob Unterwurzacher2017-05-14 14:02:08 +0200
commit2aea2d3d62e5df4c8bf25195dc97e60b495f6f12 (patch)
tree1d81d3d4bea7e40d5c507c71ece15c35e3c490f1 /internal/readpassword
parent8aabc542761046efdfe2c6b07662e446d223367b (diff)
exitcodes: add code 22 for "password is empty"
Empty passwords are not allowed. Let's give the error it's own exit code.
Diffstat (limited to 'internal/readpassword')
-rw-r--r--internal/readpassword/read.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/readpassword/read.go b/internal/readpassword/read.go
index 058735d..481911b 100644
--- a/internal/readpassword/read.go
+++ b/internal/readpassword/read.go
@@ -65,7 +65,7 @@ func readPasswordTerminal(prompt string) string {
fmt.Fprintf(os.Stderr, "\n")
if len(p) == 0 {
tlog.Fatal.Println("Password is empty")
- os.Exit(exitcodes.ReadPassword)
+ os.Exit(exitcodes.PasswordEmpty)
}
return string(p)
}