Skip to content

Fix scriptblock being serialised as empty string#7

Merged
Jaykul merged 1 commit into
PoshCode:mainfrom
fsackur:fix-scriptblock
Aug 17, 2022
Merged

Fix scriptblock being serialised as empty string#7
Jaykul merged 1 commit into
PoshCode:mainfrom
fsackur:fix-scriptblock

Conversation

@fsackur

@fsackur fsackur commented Aug 11, 2022

Copy link
Copy Markdown
Contributor

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.

@Jaykul Jaykul merged commit 42432c4 into PoshCode:main Aug 17, 2022
@fsackur fsackur deleted the fix-scriptblock branch August 17, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants