Phil-Factor / PSYaml

A Powershell module to convert YAML documents to and from PowerShell objects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: $false as Boolean value creates an empty output

Fishy78 opened this issue · comments

Hi there:

Found a small issue in CovertTo-Yaml.ps1:

        # if it is null return null
        If ( !($inputObject) )

Should be:

        # if it is null return null
        If ( $inputObject -eq $null )

Reason:
If the object itself is "$false", it will return an empty yaml value

How to reproduce:

$test = [PSCustomObject]@{TestValue = $false }
ConvertTo-Yaml $test