PowerShell / PSResourceGet

PSResourceGet is the package manager for PowerShell
https://www.powershellgallery.com/packages/Microsoft.PowerShell.PSResourceGet
MIT License
483 stars 92 forks source link

Bugfix Update-ModuleManifest throws null pointer exception #1538

Closed anamnavi closed 7 months ago

anamnavi commented 7 months ago

Enable Update-PSModuleManifest and Get-PSScriptFileInfo tests that got disabled along the way. Fix bug where Update-PSModuleManifest throws null pointer, fixes #1487

Handle Update-PSModuleManifest calls with -Prerelease, -RequireLicenseAcceptance, and ExternalModuleDependencies parmaters on Windows PowerShell. Since Update-PSModuleManifest calls New-ModuleManifest but those parameters weren't supported for New-ModuleManifest on Windows PowerShell, we need to create the PrivateData entry with the parameter values and then replace the default PrivateData entry in the .psd1 with the correct/updated one.

Support cases where -PrivateData is a nested hashtable (this was a bug stemming from New-ModuleManifest and can't be fixed here but I've added bugfix so that Update-PSModuleManifest` can handle it on PSCore and WinPS.

PR Summary

PR Context

PR Checklist