You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When specifying $false as the DefaultValue for Resolve-NodeProperty it is treated as if no DefaultValue was passed in. If the specified PropertyPath does not exist instead of $false being returned instead we throw the following error:
"The lookup of path '$PropertyPath' for node '$($node.Name)' returned a Null value, but Null is not specified as Default. This is not allowed."
The text was updated successfully, but these errors were encountered:
The same thing happens when passing in an empty list (@()) as DefaultValue. The issue seems to be on line 59 of file Resolve-NodeProperty.ps1, because it checks the presence of DefaultValue with a simple if (truthy values) instead of checking the presence of the key in the $PSBoundParameters dictionary. I think line 59 should be elseif ($PSBoundParameters.ContainsKey('DefaultValue')), but it depends on the original thought process for the implementation. @gaelcolas, @raandree any thoughts?
When specifying $false as the DefaultValue for Resolve-NodeProperty it is treated as if no DefaultValue was passed in. If the specified PropertyPath does not exist instead of $false being returned instead we throw the following error:
"The lookup of path '$PropertyPath' for node '$($node.Name)' returned a Null value, but Null is not specified as Default. This is not allowed."
The text was updated successfully, but these errors were encountered: