-
Notifications
You must be signed in to change notification settings - Fork 414
feat: throw error on deploy command if build fails and user has --json option #7367
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
feat: throw error on deploy command if build fails and user has --json option #7367
Conversation
📊 Benchmark resultsComparing with d81b990
|
…t-error-code-with-the-json-flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cwd: builder.directory, | ||
env: { NETLIFY_SITE_ID: context.siteId }, | ||
}), | ||
).rejects.toThrow('Error while running build') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we expect the output to be json on failures or no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope don't do that anywhere else
…t-error-code-with-the-json-flag
…t-error-code-with-the-json-flag
Summary
When a build fails when a user runs
netlify deploy --json
it currently fails silently. Behaviour can be seen by running:on a project that has
exit 1
as its build command.This PR changes that so we now throw an error like elsewhere in the deploy command, regardless of the
--json
option