Skip to content

Conversation

@cincuranet
Copy link
Collaborator

Fixes #2293.

Copy link

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 adds graceful handling for invalid characters or paths in the PATH environment variable by wrapping Path.Combine in a try-catch block to prevent exceptions when processing potentially malformed PATH entries.

  • Replaced direct Path.Combine call with a new TryCombinePaths helper method that handles exceptions
  • Added a local static helper function to safely combine paths and return success/failure status

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cincuranet cincuranet merged commit 049ed4f into microsoft:main Sep 8, 2025
5 checks passed
@cincuranet cincuranet deleted the fix-path branch September 8, 2025 19:09
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.

an unexcepted error while install

2 participants