Skip to content

Resolve file paths before passing to native commands #10675

@SteveL-MSFT

Description

@SteveL-MSFT

Summary of the new feature/enhancement

On Windows, the ~ is only understood by PowerShell. So if you try: notepad ~\foo.txt, it complains it can't find the file path. On Windows and non-Windows PSDrives have no meaning outside of PowerShell, so you can't do something like pico temp:/temp.txt with expectation that you're creating a file in the temp drive.

Proposed technical implementation details (optional)

The problem is determining if the file path should be resolved or if it's a literal string being passed to the native command. In most cases, it would seem that resolving the path would be fine. Literal strings can have quotes around them making it explicit.

Metadata

Metadata

Assignees

Labels

Issue-Enhancementthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtime

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions