Not sure if this belongs here, but had a project with an errantly committed bin/ folder containing things that would be installed via Composer.
As a result, when attempting to run a grunt build, the composer:install task would fail, but grunt would continue on. The deployment process checks that any command executed returns exit code 0, otherwise the deployment is halted and marked as failed. Since this isn't correctly interpreting the error as an error, the deployment continued on and essential composer mangaged dependencies were missed.
$ grunt build:staging
Running "build:staging" (build) task
Running "composer:install" (composer) task
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing composer/installers (v1.0.18)
Downloading: 100%
- Installing squizlabs/php_codesniffer (1.5.5)
Downloading: 100%
[ErrorException]
file_put_contents([redacted, current working directory]/bin/phpcs): failed to open stream: No such file or directory
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
Done, without errors.
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing squizlabs/php_codesniffer (1.5.5)
Downloading: 100%
[ErrorException]
file_put_contents([redacted, current working directory]/bin/phpcs): failed to open stream: No such file or directory
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
$ echo $?
1
Sure the composer managed dependencies shouldn't have been committed (and removing them "fixes" things), but the failed composer install shouldn't have a grunt build returning "Done, without errors."
Not sure if this belongs here, but had a project with an errantly committed
bin/
folder containing things that would be installed via Composer.As a result, when attempting to run a
grunt build
, thecomposer:install
task would fail, but grunt would continue on. The deployment process checks that any command executed returns exit code 0, otherwise the deployment is halted and marked as failed. Since this isn't correctly interpreting the error as an error, the deployment continued on and essential composer mangaged dependencies were missed.Sure the composer managed dependencies shouldn't have been committed (and removing them "fixes" things), but the failed
composer install
shouldn't have a grunt build returning "Done, without errors."cc: @kevinlangleyjr