Merge pull request #260 from groyoh/exit_status

Change exit status to 2 on command error
This commit is contained in:
Dale Hui 2019-08-10 02:16:59 -07:00 committed by GitHub
commit 6c7d3123c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -262,6 +262,9 @@ Database drivers: `+strings.Join(database.List(), ", ")+"\n")
default:
flag.Usage()
os.Exit(0)
// If a command is not found we exit with a status 2 to match the behavior
// of flag.Parse() with flag.ExitOnError when parsing an invalid flag.
os.Exit(2)
}
}