JustinGrote / JustinGrote/ModulePath
Get-ModulePath -AllUsers returns wrong folder path
- Ngôn ngữ chính
- PowerShell
- Star
- 25
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- powershell
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 50/100