Skip to content

Clarify Darc minimum-version upgrade instruction based on host OS#6424

Merged
premun merged 3 commits into
mainfrom
copilot/update-error-message-for-os-specific-scripts
Jun 22, 2026
Merged

Clarify Darc minimum-version upgrade instruction based on host OS#6424
premun merged 3 commits into
mainfrom
copilot/update-error-message-for-os-specific-scripts

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The Darc minimum-version error was pointing users to a generic darc-init command, 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

    • Updated DarcVersionValidator's minimum-version error message to reference a single OS-appropriate script:
      • ./eng/common/darc-init.sh on Linux/macOS
      • .\eng\common\darc-init.ps1 on Windows
    • Kept the existing dotnet tool update -g microsoft.dotnet.darc fallback in the message.
  • Why it matters

    • Makes upgrade instructions immediately actionable without showing users commands for other platforms.
    • Aligns the Darc CLI error text with the host machine OS instead of requiring users to choose between multiple script names.
  • Resulting message

    logger.LogError(
        "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(),
        minVersion.ToNormalizedString(),
        GetDarcInitCommand());

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
Copilot AI requested a review from premun June 22, 2026 09:38
{
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.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot can you just show the right one based on the host machine OS info?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copilot AI requested a review from premun June 22, 2026 10:01
@premun premun marked this pull request as ready for review June 22, 2026 10:05
Copilot AI review requested due to automatic review settings June 22, 2026 10:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-init script.
  • 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 premun enabled auto-merge (squash) June 22, 2026 10:09
@premun premun disabled auto-merge June 22, 2026 11:01
@premun premun merged commit 174c4e3 into main Jun 22, 2026
10 of 12 checks passed
@premun premun deleted the copilot/update-error-message-for-os-specific-scripts branch June 22, 2026 11:01
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.

4 participants