-
Notifications
You must be signed in to change notification settings - Fork 160
Prevent none zero exit code #130
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
When running `composer install --no-dev` the bash command `[ $COMPOSER_DEV_MODE -eq 1]` will cause an exit code of 1. Build environments such as bitbucket piplines will often halt the build when encountering a none zero exit code. To resolve this, we force the exit code to be 0 with some boolean logic.
@@ -12,10 +12,10 @@ You can achieve this by adding the following to your project's `composer.json`: | |||
```` | |||
"scripts": { | |||
"post-install-cmd": [ | |||
"[ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/" | |||
"([ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/) || true" |
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.
"([ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/) || true" | |
"([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)" |
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.
Please sign Contributor License Agreement and see my suggestions.
@lenaorobei As it stands, your suggestion doesn't seem to make much sense. Did you perhaps intend to change the |
@pocallaghan, yes, you are absolutely right! I missed that part. |
Co-Authored-By: Lena Orobei <[email protected]>
@lenaorobei OK, cool. That approach works for me. |
- fixed readme
* AC-1060: Move relevant sniffs from PHPCompatibility
When running
composer install --no-dev
the bash command[ $COMPOSER_DEV_MODE -eq 1]
will cause an exit code of 1. Build environments such as bitbucket piplines will often halt the build when encountering a none zero exit code. To resolve this, we force the exit code to be 0 with some boolean logic.