Skip to content

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sarahetter
Copy link
Contributor

@sarahetter sarahetter commented Jun 25, 2025

Summary

When a build fails when a user runs netlify deploy --json it currently fails silently. Behaviour can be seen by running:

export DEPLOY_JSON=$(netlify deploy --json)
echo $DEPLOY_JSON

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

@sarahetter sarahetter requested a review from a team as a code owner June 25, 2025 23:06
Copy link

github-actions bot commented Jun 25, 2025

📊 Benchmark results

Comparing with 7a27b4f

  • Dependency count: 1,105 (no change)
  • Package size: 277 MB ⬇️ 0.00% decrease vs. 7a27b4f
  • Number of ts-expect-error directives: 399 (no change)

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.

1 participant