Prerequisites
Summary
While developing the coalesce function and writing the documentation, I stumbled on the following error from example 3:
Parser: Parameter 'customValue' not found in context.
It looks like parameter default values set to null are not allowed.
Steps to reproduce
Run the following example from the branch comparison-function-coalesce:
$in = @'
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
parameters:
customValue:
type: string
defaultValue: null
timeout:
type: int
defaultValue: 0
resources:
- name: Configuration with fallbacks
type: Microsoft.DSC.Debug/Echo
properties:
output:
configValue: "[coalesce(parameters('customValue'), 'default-config')]"
timeout: "[coalesce(parameters('timeout'), 30)]"
'@
dsc config get --input $in
Expected behavior
The example would have returned null on `configValue`
Actual behavior
The error: Parser: Parameter 'customValue' not found in context occurs
Error details
Environment data
Name Value
---- -----
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
dsc 3.2.0-preview.3
Visuals
No response
Prerequisites
Summary
While developing the
coalescefunction and writing the documentation, I stumbled on the following error from example 3:Parser: Parameter 'customValue' not found in context.
It looks like parameter default values set to
nullare not allowed.Steps to reproduce
Run the following example from the branch comparison-function-coalesce:
Expected behavior
The example would have returned null on `configValue`Actual behavior
The error: Parser: Parameter 'customValue' not found in context occursError details
Environment data
Version
dsc 3.2.0-preview.3
Visuals
No response