Add exit code check after bootstrap build in eng/build.ps1 #122665
+5
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Bootstrap build failures in
eng/build.ps1were silently ignored, allowing the script to proceed to artifact cleanup and main build stages. This caused confusing downstream failures and wasted build time.Added
$lastExitCodecheck after bootstrap build invocation (line 399) to halt immediately on failure:Pattern matches existing failure handling in the script (lines 196-199, 215-218, 420-426) and aligns with
build.shbehavior (set -ue).Customer Impact
Developers see clear, immediate failure messages instead of confusing errors from subsequent build stages attempting to use broken bootstrap artifacts.
Regression
No. This fixes a long-standing issue in the bootstrap build path.
Testing
build.ps1Risk
Low. Adds defensive check that only triggers on actual bootstrap failures. No changes to success paths or build logic.
Original prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.