Open o-l-a-v opened 6 months ago
Here are the two tags used in PSRG to denote if a NuGet package is a module or script.
The logic should be updated check packages on a repo and fail if either of those tags aren't found.
This seems to be by design: If neither a script or a module => Install as module.
I don't understand that design decision. 🤔
We should be installing nupkgs to the nugetcache https://github.com/nuget/docs.microsoft.com-nuget/blob/main/docs/consume-packages/managing-the-global-packages-and-cache-folders.md#managing-the-global-packages-cache-and-temp-folders
Prerequisites
Steps to reproduce
As you can add any nuget v2 and v3 repository to PSResourceGet, maybe it would be smart to validate whether packages are ment for PowerShell before installing?
Take NuGet.Versioning for instance, it installs to
$env:PSModulePath
as a PowerShell module, but can't be imported as a module.Steps to reproduce:
Related comments:
Expected behavior
Validate whether a package is made for PowerShell. Tags? Content when decompressed?
Alternatively, do something else with non-PowerShell NuGet packages? Add to different path or something.
Actual behavior
Installs non-PowerShell resources as if they were modules.
Error details
No response
Environment data
Visuals
No response