Skip to content

Commit

Permalink
Add more exit code strings
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Nov 2, 2021
1 parent 4cbdaf1 commit 69d23cd
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion segment-exitcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,28 @@ import (
)

var exitCodes = map[int]string{
1: "ERROR",
// 1: generic
1: "ERROR",
// 2, 126, 127: common shell conventions, e.g. bash, zsh
2: "USAGE",
126: "NOEXEC",
127: "NOTFOUND",
// 64-78: BSD, sysexits.h
64: "USAGE",
65: "DATAERR",
66: "NOINPUT",
67: "NOUSER",
68: "NOHOST",
69: "UNAVAILABLE",
70: "SOFTWARE",
71: "OSERR",
72: "OSFILE",
73: "CANTCREAT",
74: "IOERR",
75: "TEMPFAIL",
76: "PROTOCOL",
77: "NOPERM",
78: "CONFIG",
}

func getMeaningFromExitCode(exitCode int) string {
Expand Down

0 comments on commit 69d23cd

Please sign in to comment.