Clarify Darc minimum-version upgrade instruction based on host OS#6424
Merged
premun merged 3 commits intoJun 22, 2026
Conversation
Copilot
AI
changed the title
[WIP] Update error message for darc-init command with OS-specific scripts
Clarify Darc minimum-version upgrade instructions by OS
Jun 22, 2026
premun
reviewed
Jun 22, 2026
| { | ||
| logger.LogError( | ||
| "Your darc version {DarcVersion} is below the minimum required version {MinVersion}. Run `darc-init` (or `dotnet tool update -g microsoft.dotnet.darc`) to upgrade.", | ||
| "Your darc version {DarcVersion} is below the minimum required version {MinVersion}. Run `eng/common/darc-init.sh` on Linux/macOS, or `eng/common/darc-init.ps1` on Windows (or `dotnet tool update -g microsoft.dotnet.darc`) to upgrade.", |
Member
There was a problem hiding this comment.
@copilot can you just show the right one based on the host machine OS info?
Contributor
Author
There was a problem hiding this comment.
Updated in f7660e7 — the validator now selects a single command at runtime based on the host OS: ./eng/common/darc-init.sh on Linux/macOS and .\eng\common\darc-init.ps1 on Windows.
Copilot
AI
changed the title
Clarify Darc minimum-version upgrade instructions by OS
Clarify Darc minimum-version upgrade instruction based on host OS
Jun 22, 2026
adamzip
approved these changes
Jun 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Darc CLI minimum-version enforcement message so users are guided to run the correct bootstrap script for their current OS, making the upgrade path more immediately actionable.
Changes:
- Updated the minimum-version failure log message to reference an OS-appropriate
eng/common/darc-initscript. - Added a small helper (
GetDarcInitCommand) that selects the script path based on the host OS at runtime.
Comment on lines
64
to
66
| logger.LogError( | ||
| "Your darc version {DarcVersion} is below the minimum required version {MinVersion}. Run `darc-init` (or `dotnet tool update -g microsoft.dotnet.darc`) to upgrade.", | ||
| "Your darc version {DarcVersion} is below the minimum required version {MinVersion}. Run `{DarcInitCommand}` (or `dotnet tool update -g microsoft.dotnet.darc`) to upgrade.", | ||
| darcVersion.ToNormalizedString(), |
premun
approved these changes
Jun 22, 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.
The Darc minimum-version error was pointing users to a generic
darc-initcommand, which obscured the actual script to run on each platform. This updates the guidance to select the correct bootstrap script for the current host OS at runtime.What changed
DarcVersionValidator's minimum-version error message to reference a single OS-appropriate script:./eng/common/darc-init.shon Linux/macOS.\eng\common\darc-init.ps1on Windowsdotnet tool update -g microsoft.dotnet.darcfallback in the message.Why it matters
Resulting message