-
Notifications
You must be signed in to change notification settings - Fork 8k
Set CLI exit code to 1 when invalid parameters are passed #5093
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
Conversation
- cli, cgi and phpdbg print error to sdterr
|
This PR tries to fulfill some thoughts from this review: #4466 (review) |
nikic
left a comment
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.
This looks good to me, I'd only like to see the new -2 value given a proper name. Like PHP_GETOPT_INVALID_ARG or so.
|
I think this should be fine for 7.3. It changes the exit code, but only in an error case, where execution of the program is aborted. As such, I don't see how this could cause a practical backwards compatibility issue. Does anyone have concerns about this? |
chamajcpradel
left a comment
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.
Sirs. I will have to adjust my local scripts. LGTM.
|
Merged as fd08f06 into 7.3. Thanks! |
Hello! This is a continuation of #4466 with some enhancements: