Describe the bug
When using the Metadata keyword`, the value passed may be null. When null is passed an exception is raised.
To Reproduce
Steps to reproduce the behaviour.
Document 'Example' {
Metadata $Null
}
Expected behaviour
Metadata should gracefully handle null data by not adding any metadata and supressing the exception by default.
Error output
Invoke-PSDocument : Cannot bind argument to parameter 'Body' because it is null.
At line:1 char:18
+ ... s.Info | %{ Invoke-PSDocument -Path .\RuleHelp.Doc.ps1 -OutputPath .\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Write-Error], InvokeDocumentException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Metadata,Invoke-PSDocument
Module in use and version:
- Module: PSDocs
- Version 0.6.1
Describe the bug
When using the
Metadatakeyword`, the value passed may be null. When null is passed an exception is raised.To Reproduce
Steps to reproduce the behaviour.
Expected behaviour
Metadata should gracefully handle null data by not adding any metadata and supressing the exception by default.
Error output
Module in use and version: