Skip to content

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

Merged
merged 2 commits into from
Aug 16, 2019
Merged

Prevent none zero exit code #130

merged 2 commits into from
Aug 16, 2019

Conversation

pocallaghan
Copy link

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.

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.
@magento-cicd2
Copy link

magento-cicd2 commented Aug 13, 2019

CLA assistant check
All committers have signed the CLA.

@@ -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"
Copy link
Contributor

@lenaorobei lenaorobei Aug 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"([ $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/)"

Copy link
Contributor

@lenaorobei lenaorobei left a 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.

@pocallaghan
Copy link
Author

@lenaorobei As it stands, your suggestion doesn't seem to make much sense. Did you perhaps intend to change the -eq 1 to -eq 0 as well?

@lenaorobei
Copy link
Contributor

@pocallaghan, yes, you are absolutely right! I missed that part.

Co-Authored-By: Lena Orobei <[email protected]>
@pocallaghan
Copy link
Author

@lenaorobei OK, cool. That approach works for me.

@lenaorobei lenaorobei merged commit fefba0a into develop Aug 16, 2019
lenaorobei added a commit to konarshankar07/magento-coding-standard that referenced this pull request Aug 16, 2019
hostep added a commit to baldwin-agency/magento2-module-url-data-integrity-checker that referenced this pull request Aug 18, 2019
@lenaorobei lenaorobei deleted the pocallaghan-patch-1 branch November 4, 2019 18:09
magento-devops-reposync-svc pushed a commit that referenced this pull request Nov 25, 2021
* AC-1060: Move relevant sniffs from PHPCompatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants