We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Resolve-Path -RelativeBasePath
-Relative
The -RelativeBasePath string parameter qualifies the -Relative switch.
-RelativeBasePath
Currently, -RelativeBasePath is ignored if -Relative isn't also specified.
The better solution is for -RelativeBasePath to imply -Relative, analogous to how, with Get-ChildItem, -Depth implies -Recurse.
Get-ChildItem
-Depth
-Recurse
Update: Turns out that -RelativeBasePath without -Relative does have a use case, albeit only with relative input paths; see comments below.
Resolve-Path $Home -RelativeBasePath / # -Relative not specified; should be implied
E.g., on Windows:
.\Users\jdoe
Path ---- C:\Users\jdoe
That is, -RelativeBasePath was quietly ignored.
No response
PowerShell 7.4.0
Prerequisites
Steps to reproduce
The
-RelativeBasePathstring parameter qualifies the-Relativeswitch.Currently,
-RelativeBasePathis ignored if-Relativeisn't also specified.The better solution is for
-RelativeBasePathto imply-Relative, analogous to how, withGet-ChildItem,-Depthimplies-Recurse.Update: Turns out that
-RelativeBasePathwithout-Relativedoes have a use case, albeit only with relative input paths; see comments below.Expected behavior
E.g., on Windows:
Actual behavior
E.g., on Windows:
That is,
-RelativeBasePathwas quietly ignored.Error details
No response
Environment data
Visuals
No response