PoshCode / Metadata

Serialization for the PowerShell metadata format
MIT License
19 stars 2 forks source link

Fix scriptblock being serialised as empty string #7

Closed fsackur closed 2 years ago

fsackur commented 2 years ago

Hi, spotted this bug.

Repro:

{foo} | Export-Metadata .\test.psd1; gc .\test.psd1
# output: (ScriptBlock '')

With fix:

{foo} | Export-Metadata .\test.psd1; gc .\test.psd1
# output: (ScriptBlock 'foo')

It seems that I can't work around this by passing a converter, unfortunately.