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
{{ message }}
Repository navigation
Inconsistent array parsing(string values are wrapped in an array instead of parsed) #82
@le0nik@JaKXz having revisited this, my feeling is that this behavior is actually reasonable -- although we may want to document it somewhere?
My expectation with .config is that that the object passed would already have split arrays and objects out, so something like this:
.config({foo: ["a","b"],bar: {a: 99,b: 33}})
This makes it easy to load a JSON configuration file of disk and use it to populate yargs. tldr; I don't think we should think of the values passed to .config as unparsed command line values, rather they're an intermediate JSON representation.
Activity
bcoe commentedon Mar 22, 2017
@le0nik thanks for opening this issue; we're playing catch up right now, but will work on getting to this ASAP!
JaKXz commentedon Apr 15, 2017
Good news! I have a failing test around this (I think). PR coming soon!
bcoe commentedon Jan 1, 2018
@le0nik @JaKXz having revisited this, my feeling is that this behavior is actually reasonable -- although we may want to document it somewhere?
My expectation with
.configis that that the object passed would already have split arrays and objects out, so something like this:This makes it easy to load a JSON configuration file of disk and use it to populate yargs. tldr; I don't think we should think of the values passed to
.configas unparsed command line values, rather they're an intermediate JSON representation.