Document the renamed `-BasePath` parameter (formerly `-RelativeBasePath`) of Resolve-Path
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 79/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- powershell
- Domain
- documentation
Research direction
Start with reference/7.7/Microsoft.PowerShell.Management/Resolve-Path.md. Update the parameter heading and YAML alias, then change the syntax blocks and Example 7 to use -BasePath; include the PowerShell 7.7 rename and backwards compatibility details from the issue. Done when the reference documents the new name and alias consistently.
Written by the indexing model from the issue text.
Description
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new
Get-Foocmdlet" instead of "New cmdlet."
Summary
PowerShell is renaming the -RelativeBasePath parameter of Resolve-Path to -BasePath in PowerShell 7.7. The original -RelativeBasePath name remains available as a parameter alias for backwards compatibility. The cmdlet reference needs to document the new parameter name and the alias.
Details
The rename was proposed in PowerShell/PowerShell#20937: the name -RelativeBasePath tempted users to assume the parameter only works together with the -Relative switch (or that it implies -Relative), and a distinct shorter name is easier to tab-complete. The parameter was added in PowerShell 7.4 as -RelativeBasePath and is renamed to -BasePath in PowerShell 7.7.
The parameter resolves the -Path or -LiteralPath values relative to the given base path: without -Relative the cmdlet returns PathInfo objects for the resolved paths; with -Relative it returns a string representing the relative path from the base path to the resolved paths.
Articles
- Resolve-Path (
reference/7.7/Microsoft.PowerShell.Management/Resolve-Path.md)
Suggested updates:
- Rename the
### -RelativeBasePathparameter section to### -BasePath, listRelativeBasePathas an alias in the yaml block, and note the rename in PowerShell 7.7. - Update the SYNTAX blocks and Example 7 (Resolve a path relative to another folder) to use
-BasePath.
Suggested content
Parameter description for -BasePath:
Specifies a path to resolve the path from. When you use this parameter, the cmdlet resolves the value of the Path or LiteralPath parameter relative to the base path and returns the System.Management.Automation.PathInfo object for the resolved path.
When you use this parameter with the Relative switch parameter, the cmdlet returns a string representing the relative path from BasePath to Path.
This parameter was added in PowerShell 7.4 as RelativeBasePath and renamed to BasePath in PowerShell 7.7. The original parameter name remains available as an alias for backwards compatibility.
Example:
$ExecutablePath = Get-Command -Name pwsh | Select-Object -ExpandProperty Source
Resolve-Path -Path $ExecutablePath -BasePath $Env:TEMP -Relative
Related Source Pull Requests
Related Source Issues
- Dominant language
- PowerShell
- Stars
- 2.6k
- Forks
- 1.7k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 4
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MicrosoftDocs/PowerShell-Docs
-
issue-doc-bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MicrosoftDocs/PowerShell-Docs#13391 ·
Maintainers usually reply within 1 day
-
Document Unix platform support for Get/Start/Stop/Restart-ServicePossibly taken @soroshsabz claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MicrosoftDocs/PowerShell-Docs#13385 · 1 comment ·
Maintainers usually reply within 1 day
-
Generalize the warning about combining number literals with decimal places with integer-type suffixesPossibly taken @Tegrask claimed this 2 days ago. Openneeds-triage
Difficulty 1/5 Under an hour Newbie friendliness 82/100
MicrosoftDocs/PowerShell-Docs#13384 ·
Maintainers usually reply within 1 day
-
https://github.com/MicrosoftDocs/PowerShell-Docs/issues?q=state%3Aopen%20label%3A%22needs-triage%22Openneeds-triage
Difficulty 1/5 Under an hour Newbie friendliness 65/100
MicrosoftDocs/PowerShell-Docs#13377 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MicrosoftDocs/PowerShell-Docs#13375 ·
Maintainers usually reply within 1 day
All issues in MicrosoftDocs/PowerShell-Docs
Similar issues
-
area:agent-sdk area:docs documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
anthropics/claude-code#110914 ·
-
specification
Difficulty 1/5 Under an hour Newbie friendliness 78/100
WICG/webmonetization#813 ·
Maintainers usually reply within 3 days
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Polish READMEOpendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Doc: Remove quotes and backticks around RFC objectsPossibly taken @Tirth00000 claimed this today. Opendoc good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
collective/icalendar#2146 · 1 comment ·