Skip to content

Commit

Permalink
feat: don't ask for optional but missing args (#195)
Browse files Browse the repository at this point in the history
Signed-off-by: Kasper J. Hermansen <contact@kjuulh.io>
  • Loading branch information
kjuulh committed Nov 23, 2023
1 parent c58b511 commit eb66e56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ func newRunSubCommand(
// Decide whether to fall back on prompt or give a hard error
validateInputArgs := func(value config.ShuttlePlanScript, inputArgs map[string]*string) error {
for _, arg := range value.Args {
if !arg.Required {
continue
}

arg := arg

if *inputArgs[arg.Name] == "" && *interactiveArg {
Expand Down

0 comments on commit eb66e56

Please sign in to comment.