New-Item Type SymbolicLink on Unix-like platforms unexpectedly converts relative target paths to absolute one #15233
Labels
Area-FileSystem-Provider
specific to the FileSystem provider
Issue-Bug
Issue has been identified as a bug in the product
Resolution-No Activity
Issue has had no activity for 6 months or more
WG-Cmdlets-Management
cmdlets in the Microsoft.PowerShell.Management module
WG-Engine-Providers
built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.
PR #12797 tried to implement support for relative target paths for symbolic links (symlinks).
On Windows, this now works properly.
On Unix-like platforms, a relative input path is still unexpectedly converted to a full path and stored as such in the symlink.
Steps to reproduce
Note: Run on macOS and/or Linux (the test succeeds on Windows).
Expected behavior
The test should succeed.
Actual behavior
The test fails, because the relative input path is unexpectedly first resolved to a full path before the symlink is defined:
Environment data
The text was updated successfully, but these errors were encountered: