-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional exit code support #361
Changes from 1 commit
9c0db3f
49c1229
b79f884
1510d7e
10c8309
a17c8cf
b40b627
b7329f4
f3e55a0
f688d47
882dd2c
23c7b80
b2ac061
d48e22a
d45f7c1
3b5133f
9e8ead5
0292429
7371138
271b56c
b453bf5
c3a6370
7651aa0
6eb8c82
61d4175
4cae17c
06c01a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,13 @@ import ( | |
var ( | ||
appActionDeprecationURL = "https://github.com/codegangsta/cli/blob/master/CHANGELOG.md#deprecated-cli-app-action-signature" | ||
|
||
contactSysadmin = "This is an error in the application. Please contact the distributor of this application if this is not you." | ||
|
||
errNonFuncAction = NewExitError("ERROR invalid Action type. "+ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the addition of the hyperlink, but I still think it'd be nice to include something like: Harkening back to |
||
"Must be a func of type `cli.ActionFunc`. "+ | ||
fmt.Sprintf("Must be a func of type `cli.ActionFunc`. %s", contactSysadmin)+ | ||
fmt.Sprintf("See %s", appActionDeprecationURL), 2) | ||
errInvalidActionSignature = NewExitError("ERROR invalid Action signature. "+ | ||
"Must be `cli.ActionFunc`. "+ | ||
fmt.Sprintf("Must be `cli.ActionFunc`. %s", contactSysadmin)+ | ||
fmt.Sprintf("See %s", appActionDeprecationURL), 2) | ||
) | ||
|
||
|
@@ -419,7 +421,7 @@ func HandleAction(action interface{}, context *Context) (err error) { | |
if len(vals) == 0 { | ||
fmt.Fprintln(os.Stderr, | ||
"DEPRECATED Action signature. Must be `cli.ActionFunc`") | ||
return err | ||
return nil | ||
} | ||
|
||
if len(vals) > 1 { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏