Document the renamed `-BasePath` parameter (formerly `-RelativeBasePath`) of Resolve-Path

Abierto Apto para principiantes
#13,379 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@soroshsabz ya está trabajando en esto.

Desde el 8/11/2026.

  • #13380 de @soroshsabz — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
79/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
powershell

Línea de trabajo

Empieza con reference/7.7/Microsoft.PowerShell.Management/Resolve-Path.md. Actualiza el encabezado del parámetro y el alias YAML; después, cambia los bloques de sintaxis y el ejemplo 7 para que usen -BasePath. Incluye los detalles del cambio de nombre en PowerShell 7.7 y de la compatibilidad con versiones anteriores que aparecen en el issue. El trabajo estará terminado cuando la referencia documente de forma coherente el nuevo nombre y el alias.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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-Foo cmdlet" 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:

  1. Rename the ### -RelativeBasePath parameter section to ### -BasePath, list RelativeBasePath as an alias in the yaml block, and note the rename in PowerShell 7.7.
  2. 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
Lenguaje dominante
PowerShell
Estrellas
2.6k
Forks
1.7k
Merge medio
1 d 4 h
PR fusionados (30 d)
4

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MicrosoftDocs/PowerShell-Docs

Todos los issues de MicrosoftDocs/PowerShell-Docs

Issues similares

Más issues de Documentation

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.