runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Feat: Turn list argument into repeatable flag

Open iwilltry42 opened this issue 3 years ago • 0 comments

Example argument:

args: {
  extra_food: ["hazelnut", "walnut"]
}

Expected usage:

acorn run . --extra-food foo --extra-food bar

Right now, all variants that I tried to pass in some sort of list (e.g. the one above, comma-separated, etc.) end up with an error similar to the one below:

acorn render . --extra-food foo --extra-food bar
Error: args.extra_food: 2 errors in empty disjunction:
args.extra_food: conflicting values "bar" and ["hazelnut","walnut"] (mismatched types string and list):
    /_internal_/args.cue:1:23
    Acornfile:2:15
args.extra_food: conflicting values "bar" and [...string] (mismatched types string and list):
    /_internal_/args.cue:1:23
    Acornfile:2:15

iwilltry42 avatar Jul 28 '22 18:07 iwilltry42