Get-PSResource searching module folders
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Comienza reproduciendo Get-PSResource -Name PowerShellGet y revisando el punto de entrada de búsqueda de Get-PSResource. Sigue cómo $env:PSModulePath se convierte en las rutas de búsqueda y, después, añade o actualiza la cobertura para el comportamiento indicado; se considera terminado cuando una búsqueda explícita de módulos solo comprueba los directorios de módulos y subdirectorios de versiones requeridos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
If you run Get-PSResource you'll notice that its appears to be searching in the module directories instead of $env:PSModulePath. You can especially see this behavior when searching for an explicit module.
It should only be searching like this:
- Loop through PSModulePath
- If name is specified limit search to directories with that name
- If version number is found look one folder deeper for module manifest
Get-PSResource -Name PowerShellGet
Expected behavior
Only required folders are searched when getting resources.
Actual behavior
PS C:\> Get-PSResource -Name PowerShellGet-Verbose
VERBOSE: Retrieving directories in the path 'C:\Users\Thomas\Documents\PowerShell\Modules'
VERBOSE: Retrieving directories in the path 'C:\Users\Thomas\Documents\PowerShell\Scripts'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\AnyPackage'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\AnyPackage.Chocolatey'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\AnyPackage.PowerShellGet'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\AnyPackage.Scoop'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\AnyPackage.WinGet'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\ClassExplorer'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Cobalt'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\CompletionPredictor'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\DirectoryPredictor'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\EditorServicesCommandSuite'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Foil'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\InvokeBuild'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\kbupdate'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\kbupdate-library'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Microsoft.PowerShell.Archive'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Microsoft.PowerShell.ConsoleGuiTools'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Microsoft.PowerShell.Crescendo'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Microsoft.PowerShell.GraphicalTools'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Microsoft.PowerShell.SecretManagement'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Microsoft.PowerShell.SecretStore'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Microsoft.PowerShell.TextUtility'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\NewFile'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PackageManagement'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Pester'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Plaster'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\platyPS'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerGit'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGetCompat'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PSCodeHealth'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PSDesiredStateConfiguration'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PSFramework'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PSReadLine'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PSScriptAnalyzer'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PSSQLite'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\PSStringTemplate'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\Scoop'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\ScriptLog'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\SNMP'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\SqlServer'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\TabExpansionPlusPlus'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\UniversalPackageManager.PowerShellGet'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Modules\UniversalPackageManager.Provider.Msu'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Scripts\Export-PSObjectToINI.ps1'
VERBOSE: All paths to search: 'C:\Users\Thomas\Documents\PowerShell\Scripts\Get-WindowsAutoPilotInfo.ps1'
VERBOSE: Entering GetPSResource
VERBOSE: Searching through package path: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet'
VERBOSE: Searching through package path: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet'
VERBOSE: Searching through package version path: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.19'
VERBOSE: Package version parsed as NuGet version: '3.0.19-beta19'
VERBOSE: Reading package metadata from: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.19\PSGetModuleInfo.xml'
VERBOSE: Searching through package version path: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.17'
VERBOSE: Package version parsed as NuGet version: '3.0.17-beta17'
VERBOSE: Reading package metadata from: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.17\PSGetModuleInfo.xml'
VERBOSE: Searching through package version path: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.16'
VERBOSE: Package version parsed as NuGet version: '3.0.16-beta16'
VERBOSE: Reading package metadata from: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.16\PSGetModuleInfo.xml'
VERBOSE: Searching through package version path: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.14'
VERBOSE: Package version parsed as NuGet version: '3.0.14-beta14'
VERBOSE: Reading package metadata from: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.14\PSGetModuleInfo.xml'
VERBOSE: Searching through package version path: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.12'
VERBOSE: The PSGetModuleInfo.xml file found at location: C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.12\PSGetModuleInfo.xml cannot be parsed due to TryReadPSGetInfo: Cannot read the PowerShellGet information file with error: Could not find file 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\3.0.12\PSGetModuleInfo.xml'.
VERBOSE: Searching through package version path: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\2.2.5'
VERBOSE: Package version parsed as NuGet version: '2.2.5.0'
VERBOSE: Reading package metadata from: 'C:\Users\Thomas\Documents\PowerShell\Modules\PowerShellGet\2.2.5\PSGetModuleInfo.xml'
Error details
No response
Environment data
Name Version
---- -------
PowerShellGet 3.0.19
Name Value
---- -----
PSVersion 7.4.0-preview.2
PSEdition Core
GitCommitId 7.4.0-preview.2
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
Visuals
No response
- Lenguaje dominante
- C#
- Estrellas
- 576
- Forks
- 114
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 7
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/PSResourceGet
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PowerShell/PSResourceGet#2056 ·
-
feature_request
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
PowerShell/PSResourceGet#2013 · 3 comentarios ·
-
Needs-Triage
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
PowerShell/PSResourceGet#2055 ·
-
Needs-Triage
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
PowerShell/PSResourceGet#2054 ·
-
(dsc): Export ignores `--input` filter for `Repository` and `PSResourceList` on DSC 3.3.* or above AbiertoNeeds-Triage
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
PowerShell/PSResourceGet#2053 ·
Todos los issues de PowerShell/PSResourceGet
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
SubtitleEdit/subtitleedit#15108 · 1 comentario ·
-
area/docs-content Bug pulumi/docs
Dificultad 1/5 1-3 horas Aptitud para principiantes 94/100
-
agentic-workflows untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100