Closed anamnavi closed 1 year ago
I verified that the issue repros with Microsoft.PowerShell.PSResourceGet - Update-PSModuleManifest
For the second issue, the changes to tags
entry in the module manifest is by design of New-ModuleManifest
. Update-PSModuleManifest
calls New-ModuleManifest
(for which the param type is string[] for the following params: Tags, CompatiblePSEditions, CmdletsToExport, FunctionsToExport, VariablesToExport, AliasesToExport, and a handful of other parameters, per docs).
If a user generates the module manifest with New-ModuleManifest
these parameters will be have their values listed as a string array without the @()
syntax around the array (unless it was an empty entry and then the value is just @()
). Since New-ModuleManifest
is owned by the PowerShell project to change is it out of scope/design for PSResourceGet. At any rate it should not stop the user from being able to publish with that module manifest.
For the first issue, per the docs for New-ModuleManifest
, if you omit or comment out the entry for CompanyName
, when Update-PSModuleManifest
calls into New-ModuleManifest
it will create a CompanyName entry with a value of "Unknown".
For the third issue, I've added checks to ensure Prerelease
value cannot be empty string or whitespace. I couldn't reproduce the issue of it uncommenting out a prerelease value. If a user has a module manifest with Prerelease entry like:
# Prerelease = 'preview1'
it will change it to # Prerelease = ''
Prerequisites
Steps to reproduce
I downloaded the bicep package nupkg from PSGallery, and extracted and obtained the .psd1
Update-ModuleManifest -Path ./bicep.psd1 -Version "3.0.0"
Expected behavior
Actual behavior
Error details
No response
Environment data
Visuals
No response