Open
Description
Summary of the new feature / enhancement
The current implementation of Update-ModuleManifest
does not accept empty arguments for a number of parameters, meaning it can't be used to clear array-like values from existing manifests:
Update-ModuleManifest .\Test\Test.psd1 -RequiredModules @()
Instead of updating the manifest with RequiredModules = @()
, this actually throws a validation error because -RequiredModules
doesn't accept empty arguments.
This issue was initially raised here.
Proposed technical implementation details (optional)
Update the cmdlet in src/code/UpdateModuleManifest.cs
.
Parameters that should be decorated with [AllowEmptyCollection]
:
NestedModules
TypesToProcess
FormatsToProcess
ScriptsToProcess
RequiredAssemblies
FileList
ModuleList
FunctionsToExport
AliasesToExport
VariablesToExport
CmdletsToExport
DscResourcesToExport
CompatiblePSEditions
There's a number of additional parameters for which [AllowNull]
/[AllowEmptyString]
might be appropriate too.