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

Warnings, Skips, and Failures #74

Merged
merged 2 commits into from
Oct 7, 2021
Merged

Conversation

jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Oct 7, 2021

You can now have the command exit with a failure status code, useful for CI deployments.

In your config/statamic/ssg.php you can set whether to fail on errors or warnings (which includes errors).

'failures' => false, // 'errors' or 'warnings'

Here's what you'd see with failures enabled:

image

With them disabled (the default):

image

On my terminal, the color of the next prompt is the exit code.
The first command exited with a failure code, so it's red. The second one succeeded, so it's green.

When failures are disabled, you'll see the errors and warnings inline, then a summary.

Closes #70
Closes #71
Closes #72

@jasonvarga jasonvarga merged commit 3ddc8f8 into master Oct 7, 2021
@jasonvarga jasonvarga deleted the fix/warnings-skips-and-failures branch October 7, 2021 20:03
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.

Throw when SSG fail unexpectedly
1 participant