Skip to content

Commit

Permalink
feat: Default to "new" command handler for options (#3043)
Browse files Browse the repository at this point in the history
Fixes #3040
If the specified "language" to the new command starts with '-', assume
it's an option to the new command. Shortcircuit the following logic and
handle the option.

Co-authored-by: Matt Toohey <[email protected]>
  • Loading branch information
AlexSzlavik and matt2e authored Oct 8, 2024
1 parent ab85336 commit 8e19016
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/cli/cmd_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func prepareNewCmd(ctx context.Context, k *kong.Kong, args []string) error {
return nil
}
language := args[1]
if len(language) == 0 {
// Default to `new` command handler if no language is provided, or option is specified on `new` command.
if len(language) == 0 || language[0] == '-' {
return nil
}

Expand Down

0 comments on commit 8e19016

Please sign in to comment.