Repository navigation
Fix dotnetup bootstrap fallback on Unix - #55145
Merged
nagilson merged 5 commits intoJul 6, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Unix toolset bootstrap path so that dotnetup failures during bootstrap do not fail InitializeToolset, allowing Arcade’s normal dotnet-install fallback logic to proceed (#55136).
Changes:
- Return early (without failing the script) when
dotnetupacquisition fails, enabling the standard fallback path. - Temporarily disable
errexitarounddotnetup sdk installto capture the exit code reliably. - Return early on
dotnetup sdk installfailure soInitializeDotNetClican fall back todotnet-install.
nagilson
marked this pull request as draft
July 6, 2026 16:11
nagilson
force-pushed
the
nagilson/dotnetup-bootstrap-fallback
branch
from
July 6, 2026 16:13
dc8ce4a to
23bb8cc
Compare
…ty with sh) Co-authored-by: Copilot <[email protected]>
nagilson
marked this pull request as ready for review
July 6, 2026 17:28
Route the dotnetup 'sdk install' and 'runtime install' native invocations in
configure-toolset.ps1 and restore-toolset.ps1 through a new shared helper,
Invoke-DotnetupNativeCommand, in dotnetup-shared.ps1.
The helper locally neutralizes both \Continue ('Stop' from the
build host) and \False (defaults \True on
PowerShell 7.4+) so a non-zero native exit code cannot become a terminating
error that bypasses the graceful fallback. A genuine throw (e.g. missing
executable) is caught and surfaced as a non-zero exit code. It returns the
process exit code for the caller's existing fallback check.
Co-authored-by: Copilot <[email protected]>
The identical 'save \$-, set +e, run, capture \True, restore set -e' block was copy-pasted in three places (configure-toolset.sh dotnetup sdk install, restore-toolset.sh dotnetup runtime install, and the dotnet-install fallback). Factor it into a shared RunWithoutErrexit helper in dotnetup-shared.sh (the shell counterpart to Invoke-DotnetupNativeCommand in dotnetup-shared.ps1). It returns the wrapped command's exit code via the global _RunWithoutErrexit, following the _<FunctionName> return convention already used for _GetDotNetInstallScript, and always returns 0 itself so callers can invoke it as a plain command under 'set -e'. Co-authored-by: Copilot <[email protected]>
nagilson
enabled auto-merge
July 6, 2026 20:26
dsplaisted
approved these changes
Jul 6, 2026
This was referenced Jul 7, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses the first part of #55136.
restore-toolsetwas made to not exit with a failure code so the .NET Install script fallback would work. Butrestore-toolsetis only called when we begin to run tests.The
configure-toolsetis a different script, and it exists because we need to install the SDK first so that arcade itself can download (we rundotnet msbuildagainst the arcade toolset project.)Its call to get dotnetup and run it was not fixed with those same protections. This makes the dotnetup acquisition and run not fail or cause any side-effects if it fails. This allows the builtin call to the .NET Install scripts to work as a fallback which is how arcade normally gets set up, but arcade's logic to do that doesn't run if the sdk already exists, preventing redundant work.