wwkimball/yamlpath

Unable to change scalar nodes from null to anything else

wwkimball opened this issue · 0 comments

Note to self: Users are able to create null values but once a node is null, that value cannot be changed to anything else. Example:

---
scalar_string: value
scalar_null:
scalar_int: 1028
scalar_bool: true

Actual Result

$ cat scalars.yaml | yaml-set --change=/scalar_null --value=new
---
scalar_string: value
scalar_null:
scalar_int: 1028
scalar_bool: true

Expected Result

$ cat scalars.yaml | yaml-set --change=/scalar_null --value=new
---
scalar_string: value
scalar_null: new
scalar_int: 1028
scalar_bool: true