Skip to content
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

Emit correct exit code on Sass compilation errors if env != development #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

polarbirke
Copy link
Member

Use hard exit for prod, staging and testing environments (this
is especially important for CI debugging) when Sass encounters
compilation errors. On the other hand, it is useful to only emit
"soft" errors during local development; it would be frustrating
if watch/serve process would crash every time a Sass compilation
is not successful (e.g. because of a typo).

Use hard exit for prod, staging and testing environments (this
is especially important for CI debugging) when Sass encounters
compilation errors. On the other hand, it is useful to only emit
"soft" errors during local development; it would be frustrating
if watch/serve process would crash every time a Sass compilation
is not successful (e.g. because of a typo).
@sebastiankugler
Copy link
Member

sebastiankugler commented Apr 14, 2022

Failing hard in environments other than development is definitely an improvement compared to failing soft everywhere.

However, I'm wondering if there is a better way to allow soft errors for background tasks (watch/serve) while keeping the hard errors for build tasks? I don't use watch/serve regularly and I would appreciate it if a build process (phlough install) would fail with a hard error if there's a problem in the gulp compile (otherwise you would get a success message for the install which I would consider misleading).

Can you see in gulp whether it's running in a watch/serve process? Could you start the watch/serve with a parameter to suppress hard errors?

@polarbirke
Copy link
Member Author

Super Idee @sebastiankugler 👍

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.

2 participants