-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Support for --if-present when running custom scripts #8304
Comments
I think |
I think this should be a separate feature in that case.
In my opinion this should be two separate cases.
My first thought when using |
I don't really get the use case for "potentially undefined scripts".. in which context are you running random scripts? Anyway this sounds like it is about custom automation of some sort.. and I'd argue you can already do it with |
OK. |
It could come in handy to have support for an
--if-present
flag when running custom scripts usingcomposer run-script
, to avoid a non-zero exit code when the script is not defined. This enables running potentially undefined scripts without breaking the execution chain.My
composer.json
:Output of
composer diagnose
:When I run these command:
I get the following output:
And I expected this to happen:
If the idea is welcome I'd be happy to implement it and send a pull request to resolve this issue.
The text was updated successfully, but these errors were encountered: