pandastrike / yaml-cli

A simple CLI for querying and updating YAML files
ISC License
86 stars 5 forks source link

Unable to create paths when needed #23

Open ssbarnea opened 7 years ago

ssbarnea commented 7 years ago

yaml set test.yaml foo.bar 1 would give an ugly set of errors instead of creating foo dictionary.

Warning: unhandled rejection for Promise {
<rejected> TypeError: Cannot read property 'foo' of undefined
at /usr/local/lib/node_modules/yaml-cli/lib/set.js:19:27
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/yaml-cli/node_modules/fairmont-helpers/lib/promise.js:91:26
at step (/usr/local/lib/node_modules/yaml-cli/node_modules/fairmont-helpers/lib/promise.js:81:20)
at /usr/local/lib/node_modules/yaml-cli/node_modules/fairmont-helpers/lib/promise.js:90:22
at <anonymous> }
Warning: unhandled rejection for Promise {
<rejected> TypeError: Cannot read property 'foo' of undefined
at /usr/local/lib/node_modules/yaml-cli/lib/set.js:19:27
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/yaml-cli/node_modules/fairmont-helpers/lib/promise.js:91:26
at step (/usr/local/lib/node_modules/yaml-cli/node_modules/fairmont-helpers/lib/promise.js:81:20)
at /usr/local/lib/node_modules/yaml-cli/node_modules/fairmont-helpers/lib/promise.js:90:22
at <anonymous> }