datum
datum copied to clipboard
ConvertTo-Datum always returns `$null` when DatumHandler returns `$false`
Issue Description
When a datum handler returns a result value of $false
or 0
, datum proceeds with $null
as value.
This results into an empty string in the merged YAML.
Issue Example
Source YAML using InvokeCommand datum handler:
NetworkIpConfiguration:
Prefix: 24
Gateway: 192.168.10.50
DnsServer: 192.168.10.10
InterfaceAlias: Ethernet
DisableNetbios: '[x={ 0 -gt 1 }=]'
Resultant YAML:
NetworkIpConfiguration:
Prefix: 24
Gateway: 192.168.10.50
DnsServer: 192.168.10.10
InterfaceAlias: Ethernet
DisableNetbios:
Expected Behauvior
Source YAML using InvokeCommand datum handler:
NetworkIpConfiguration:
Prefix: 24
Gateway: 192.168.10.50
DnsServer: 192.168.10.10
InterfaceAlias: Ethernet
DisableNetbios: '[x={ 0 -gt 1 }=]'
Resultant YAML:
NetworkIpConfiguration:
Prefix: 24
Gateway: 192.168.10.50
DnsServer: 192.168.10.10
InterfaceAlias: Ethernet
DisableNetbios: false