Add exit code check after bootstrap build in eng/build.ps1#122665
Merged
akoeplinger merged 2 commits intomainfrom Dec 26, 2025
Merged
Add exit code check after bootstrap build in eng/build.ps1#122665akoeplinger merged 2 commits intomainfrom
akoeplinger merged 2 commits intomainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
This change adds an exit code check immediately after the bootstrap build invocation to halt the build process if the bootstrap build fails. This prevents the script from continuing to cleanup and main build stages when the bootstrap has failed, providing clear and immediate feedback to developers. Fixes issue where bootstrap build failures were silently ignored and the script would continue with cleanup and main build, leading to confusing failures and wasted build time. Co-authored-by: ericstj <[email protected]>
Copilot
AI
changed the title
[WIP] Fix bootstrap build to halt on failure
Add exit code check after bootstrap build in eng/build.ps1
Dec 19, 2025
ericstj
approved these changes
Dec 19, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a critical exit code check after the bootstrap build in eng/build.ps1 to prevent the script from continuing with artifact cleanup and main build stages when the bootstrap build fails. Previously, bootstrap build failures were silently ignored, leading to confusing downstream errors and wasted build time.
Key Changes
- Added
$lastExitCodevalidation immediately after bootstrap build invocation (lines 401-404) - Ensures script halts with clear error message on bootstrap failure
- Aligns with existing error handling patterns used elsewhere in the same file
jkoritzinsky
approved these changes
Dec 19, 2025
akoeplinger
approved these changes
Dec 26, 2025
This was referenced Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.