Skip to content

Split PATH on the platform-specific separator in LocateDotNet - #17434

Merged
ViktorHofer merged 1 commit into
dotnet:mainfrom
ViktorHofer:locate-dotnet-path-separator
Aug 31, 2026
Merged

ViktorHofer merged 1 commit into
dotnet:mainfrom
ViktorHofer:locate-dotnet-path-separator

Conversation

@ViktorHofer

Copy link
Copy Markdown
Member

LocateDotNet splits PATH on a hardcoded ';', so it cannot find dotnet on Unix, where entries are colon-separated. The line just above already selects the Unix executable name, so the task is meant to work there.

  • Split PATH on Path.PathSeparator instead of ';'.

Found by the Copilot reviewer on #17381; extracted here since it is unrelated to that PR's multithreading changes.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: be19d794-fe4f-43fe-9e6e-f6e6b13ec6e7
Copilot AI lite review requested due to automatic review settings August 28, 2026 10:46

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.

Copilot review overview

Review tier: Lite
Findings: None

What changed in this PR

This PR fixes LocateDotNet’s PATH parsing so it works correctly on Unix-like platforms by using the platform-specific path list separator instead of a hardcoded ;. This aligns the PATH search logic with the existing platform-aware executable name selection (dotnet.exe vs dotnet).

Changes:

  • Replace hardcoded ';' PATH splitting with Path.PathSeparator in LocateDotNet.
File Description
src/​Microsoft.DotNet.Arcade.Sdk/​src/​LocateDotNet.cs Uses Path.PathSeparator to correctly split PATH on all supported platforms when locating the dotnet executable.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ViktorHofer
ViktorHofer enabled auto-merge (squash) August 28, 2026 10:48
@ViktorHofer
ViktorHofer merged commit 53fac5b into dotnet:main Aug 31, 2026
10 of 12 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 1, 2026
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.

3 participants