Closed
Description
ConvertTo-Yaml
is broken in the latest version (v0.4.8) when serializing a hashtable with atom values obtained from Write-Output. It is critical as values may be obtained from the functions that use Write-Output
rather than return
to return values.
For example, when assigning with Write-Output:
[ordered]@{a = Write-Output 'string'; b = Write-Output 1; c = Write-Output @{nested = $true}} | ConvertTo-Yaml
a:
Length: 6
b: {}
c:
nested: true
the string and the number were incorrectly encoded.
while without Write-Output:
[ordered]@{a = 'string'; b = 1; c = @{nested = $true}} | ConvertTo-Yaml
a: string
b: 1
c:
nested: true
the values were correctly encoded.
Metadata
Metadata
Assignees
Labels
No labels