Skip to content

Conversation

@radical
Copy link
Member

@radical radical commented Jul 18, 2025

This was originally a part of #9868, and the fix stands on its own.


Try setting the PATH in a os-aware way

(cherry picked from commit 08a4b70)

cc @joperezr @captainsafia

Customer Impact

Testing

Risk

Regression?

This was originally a part of dotnet#9868, and the fix stands on its own.

-----
Try setting the PATH in a os-aware way

(cherry picked from commit 08a4b70)
Copilot AI review requested due to automatic review settings July 18, 2025 19:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR backports a fix to ensure that the .dotnet directory is properly added to the PATH environment variable on Windows systems in the GitHub Actions workflow. The change addresses a platform-specific issue where the dotnet runtime wasn't being correctly resolved during test execution.

Key changes:

  • Adds .dotnet directory to PATH for both Linux/macOS and Windows environments
  • Ensures tests consistently use the restored dotnet runtime rather than system dotnet
  • Uses OS-appropriate PATH variable syntax ($GITHUB_PATH vs $env:GITHUB_PATH)

@radical radical added this to the 9.5 milestone Jul 18, 2025
@github-actions github-actions bot added the area-engineering-systems infrastructure helix infra engineering repo stuff label Jul 18, 2025
@radical radical modified the milestones: 9.5, 9.4 Jul 18, 2025
@radical radical requested review from captainsafia and joperezr July 18, 2025 19:28
@joperezr
Copy link
Member

Probably a dump question, but why not just root's dotnet.cmd? It is exactly for that purpose after all.

@captainsafia
Copy link
Member

Probably a dump question, but why not just root's dotnet.cmd? It is exactly for that purpose after all.

The issue I was running into was scenarios where we launched dotnet from Aspire code, in my case via the dotnet publish call in the ResourceContainerImageBuilder. We need to propagate the PATH to those callers as well.

@joperezr
Copy link
Member

Probably a dump question, but why not just root's dotnet.cmd? It is exactly for that purpose after all.

The issue I was running into was scenarios where we launched dotnet from Aspire code, in my case via the dotnet publish call in the ResourceContainerImageBuilder. We need to propagate the PATH to those callers as well.

ahh, that makes sense. Thanks for clarifying.

@joperezr joperezr merged commit c39f26c into dotnet:release/9.4 Jul 18, 2025
253 of 254 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-engineering-systems infrastructure helix infra engineering repo stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants