JustinGrote / JustinGrote/ModulePath
Get-ModulePath -AllUsers returns wrong folder path
- Langage dominant
- PowerShell
- Étoiles
- 25
- Forks
- 0
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
When running `Get-ModulePath` with _-AllUsers_ parameter, the returned folder refers to modules that are included with PowerShell, not AllUsers path.
The problem is in https://github.com/JustinGrote/ModulePath/blob/main/ModulePath.psm1#L103, where GetPSModulePath method uses wrong scope reference. The reference should be **Machine** instead of **BuiltIn**.
The problem only surfaces, when there is no custom path in .config.json file.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start at ModulePath.psm1 line 103 and inspect the GetPSModulePath scope reference. Reproduce the case with no custom path in .config.json by running Get-ModulePath -AllUsers; done means it returns the AllUsers module path rather than the PowerShell built-in modules path.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- powershell
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 50/100