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 we have field choices of option, we have to give flag one precise value.
constcac=require('../')constcli=cac()cli.command('a',{desc: 'command a',}).option('foo',{desc: 'foo is a flag for command a'.type: "string",default: "aa",choices: ["aa","bb","cc"]})
We have to give the value to flag of foo. like that:
$ cli a
# error msg
The value of flag "foo" should be one of: "aa","bb","cc"
$ cli a --foo aa
# pass
The text was updated successfully, but these errors were encountered:
When we have field
choices
ofoption
, we have to give flag one precise value.We have to give the value to flag of
foo
. like that:The text was updated successfully, but these errors were encountered: