Cannot get path of running script in $MyInvocation.InvocationName
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- powershell, typescript, vscode
- Área
- devtools
Línea de trabajo
Reproduce el problema en la extensión de PowerShell con PowerShell 7.2.3 y VS Code 1.67.0, ejecutando $MyInvocation.InvocationName y comprobando $PSScriptRoot. Compare el comportamiento con la versión 2021.12.0 de la extensión y las versiones 2022.5.0/2022.5.1; se considera terminado cuando se restaura la ruta del script sin hacer regresiones en la versión funcional.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
In versions 2022.5.0 and 2022.5.1
To get the path of a running script.
i tried
$MyInvocation.InvocationName
but I could not get the path by this command.
Similarly, to retrieve the path of a script running on
$PSScriptRoot
This also did not retrieve the path.
I downgraded the version to 2021.12.0 and got the path correctly
Thank you
Translated with www.DeepL.com/Translator
PowerShell Version
Name Value
---- -----
PSVersion 7.2.3
PSEdition Core
GitCommitId 7.2.3
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visual Studio Code Version
1.67.0
57fd6d0195bb9b9d1b49f6da5db789060795de47
x64
Extension Version
don't work
2022.5.0 and 2022.5.1
work
ms-vscode.powershell@2021.12.0
Steps to Reproduce
$MyInvocation.InvocationName
Visuals
No response
Logs
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.9k
- Forks
- 548
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PowerShell/vscode-powershell
-
[aw] Agentic Issue Triage failed Abiertoagentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
PowerShell/vscode-powershell#5599 · 3 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PowerShell/vscode-powershell#5592 · 2 comentarios · 1 reacción ·
-
[aw] Agentic Issue Triage failed Abiertoagentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
PowerShell/vscode-powershell#5583 · 1 comentario ·
-
powershell.scriptAnalysis.settingsPath (Description): Warning Message Should Provide A Workaround AbiertoArea-Code Formatting Issue-Enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
PowerShell/vscode-powershell#4653 · 3 comentarios · 4 reacciones ·
-
nothing AbiertoIssue-Bug Needs: Triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 5/100
PowerShell/vscode-powershell#5603 · 1 reacción ·
Todos los issues de PowerShell/vscode-powershell
Issues similares
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
-
code-quality refactoring
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
langchain-ai/deepagents#6450 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
vercel/react-tweet#225 ·