inpsyde / composer-asset-compiler

Composer plugin that installs dependencies and compiles assets based on configuration.
https://inpsyde.github.io/composer-asset-compiler/
MIT License
25 stars 1 forks source link

When asset compilation fails, it should exit the process with non-zero #1

Closed websupporter closed 4 years ago

websupporter commented 5 years ago

Hi, I have a node module (cabuvan-sass) which is behind private bitbucket. I forgot to grant Codeship access. So the build process failed.

Although the build failed, deployer got executed: image

If I do understand this correctly, this would mean it could happen I push on production with broken assets.

gmazzap commented 5 years ago

Yep. Ideally there's should be some way to prevent the exit, but the default behavior should be that

gmazzap commented 5 years ago

At the moment, compilation fails on error when it is ran as a command, like composer compile-assets, but not when aut-executed.

Which means that by setting auto-execution to false in config ("auto-run": false), and then add the assets compilation explicitly as a command, so that the command becomes

composer install && composer compile assets

instead of:

composer install

it is possible to obtain that.

But probably is better have the failure by default and some opt-in way to don't fail.

gmazzap commented 5 years ago

Another related thing is "stop-on-failure", or what happen one of the packages to be processed fails. Right now it defaults to false, which means that if, by-default, we want the compilation to avoid any broken assets land in production we should default to true, but right now default to false.

gmazzap commented 4 years ago

This is implemented so closing.