cat <<EOF > test1.yaml
# a:
EOF
shyaml get-value a '' < test1.yaml
Error: invalid path 'a', can't query subvalue 'a' of a leaf (leaf value is None).
cat <<EOF > test2.yaml
# a:
b: 1
EOF
shyaml get-value a '' < test2.yaml
# (empty output -> no error)
I would expect test1.yaml with no keys to be able to be queried for a non existent key, when supplying a default value, and return an empty result - not an error. It appears the document must have at least one key defined for the test to be successful.
Version: shyaml 0.6.1
I would expect test1.yaml with no keys to be able to be queried for a non existent key, when supplying a default value, and return an empty result - not an error. It appears the document must have at least one key defined for the test to be successful.