From 98a2ce2a6544e3710b384f1c2ad0d08204672d67 Mon Sep 17 00:00:00 2001 From: Peter O'Callaghan Date: Tue, 13 Aug 2019 11:02:33 +0100 Subject: [PATCH 1/2] 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. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c783f7c7..5b3b34b0 100644 --- a/README.md +++ b/README.md @@ -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" ], "post-update-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" ] } ```` From b121f954aca0a0fd5bef2a41233bf86c27f85618 Mon Sep 17 00:00:00 2001 From: Peter O'Callaghan Date: Fri, 16 Aug 2019 14:46:15 +0100 Subject: [PATCH 2/2] Update README.md Co-Authored-By: Lena Orobei --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b3b34b0..b5c784a1 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ You can achieve this by adding the following to your project's `composer.json`: "([ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/) || true" ], "post-update-cmd": [ - "([ $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/)" ] } ````