PowerShell / PowerShell/PSResourceGet
Find-PSResource not working with ProGet (Find-Module does)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
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
Using Find-PSResource against our ProGet repository returns modules with the Name not populated, and if the module isn't also available in another feed, produces an error claiming it didn't find anything (even though it showed me the version and everything else).
Using Install-PSResource fails, because the name is blank when it tries to install, so it says something like:
VERBOSE: Performing the operation "Install-PSResource" on target "Package to install: '', version: '1.0.2'".
Expected behavior
Find-PSResource should return the right metadata and not error when the module exists.
Install-PSResource should install
Actual behavior
Find-Module works fine, but Find-PSResource does not.
Install-Module works fine, but Install-PSResource does not.
Error details
Microsoft.PowerShell.PSResourceGet\Find-PSResource LDEnvironments | Format-List
AdditionalMetadata : {[NormalizedVersion, 1.0.2]}
Author :
CompanyName :
Copyright : Copyright 2023 loanDepot.com, LLC
Dependencies : {}
Description : The core loanDepot environment configuration
IconUri :
Includes : Microsoft.PowerShell.PSResourceGet.UtilClasses.ResourceIncludes
InstalledDate :
InstalledLocation :
IsPrerelease : False
LicenseUri :
Name :
Prerelease :
ProjectUri :
PublishedDate : 9/21/2023 6:37:31 PM
ReleaseNotes : LDEnvironments v1.0.2+Build.66011.Branch.main.Sha.448f19d5975533ec2db5c3096f47dc66b205f04a.Date.20230921T223524
Repository : DevOpsPowerShell
RepositorySourceLocation : https://nuget.loandepot.com/nuget/PowerShell
Tags : {PSModule, PSIncludes_Function, PSFunction_Get-LDEnvironment, PSCommand_Get-LDEnvironment}
Type : Module
UpdatedDate :
Version : 1.0.2
Find-PSResource: Package 'LDEnvironments' could not be found in any registered repositories.
When calling install:
Microsoft.PowerShell.PSResourceGet\Install-PSResource -Name LDEnvironments -Verbose
...
VERBOSE: Performing the operation "Install-PSResource" on target "Package to install: '', version: '1.0.2'".
VERBOSE: Attempting to delete 'C:\Users\joelbennett\AppData\Local\Temp\6db6a622-fc69-4ff9-8b06-9eb1225d2efc'
VERBOSE: Successfully deleted 'C:\Users\joelbennett\AppData\Local\Temp\6db6a622-fc69-4ff9-8b06-9eb1225d2efc'
Install-PSResource: Object reference not set to an instance of an object.
### Environment data
```powershell
**NOTE:** We _are_ out of date on ProGet, but ... the old module(s) work.
We're on ProGet Version 6.0.8 (Build 5)
----
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Binary 0.9.0 rc1 Microsoft.PowerShell.PSResourceGet {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Get-PSScriptFileInfo…}
Name Value
---- -----
PSVersion 7.4.0-preview.5
PSEdition Core
GitCommitId 7.4.0-preview.5
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied LDEnvironments case with Find-PSResource and Install-PSResource against ProGet 6.0.8, then compare the returned metadata with Find-Module and Install-Module. Done means the resource name is populated, Find-PSResource does not report an existing package as missing, and Install-PSResource succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100