Skip to content

Commit 98a2ce2

Browse files
author
Peter O'Callaghan
authored
Prevent none zero exit code
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.
1 parent 2960287 commit 98a2ce2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ You can achieve this by adding the following to your project's `composer.json`:
1212
````
1313
"scripts": {
1414
"post-install-cmd": [
15-
"[ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/"
15+
"([ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/) || true"
1616
],
1717
"post-update-cmd": [
18-
"[ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/"
18+
"([ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/) || true"
1919
]
2020
}
2121
````

0 commit comments

Comments
 (0)