Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"New module" CLI command regression #3040

Closed
AlexSzlavik opened this issue Oct 8, 2024 · 0 comments · Fixed by #3043
Closed

"New module" CLI command regression #3040

AlexSzlavik opened this issue Oct 8, 2024 · 0 comments · Fixed by #3043
Assignees
Labels

Comments

@AlexSzlavik
Copy link
Contributor

When invoking ftl new --help the CLI incorrectly interprets the double tac flag as a language option and throws an error.
Additionally, the CLI help messages are misleading:

~/C/t/f/alex-samples ❯❯❯ ftl new
Usage: ftl new <language> <dir> <name> [flags]
Run "ftl new --help" for more information.

ftl: error: expected "<language> <dir> <name>"

~/C/t/f/alex-samples ❯❯❯ ftl new --help
ftl: error: could not create plugin for --help: unknown language "--help"


I suspect that the issue is https://github.com/TBD54566975/ftl/blob/1a1b0517ed758ed8fa2c611779ab4936f6c90e0a/frontend/cli/main.go#L85 , with the introduction of a fail early for the language plugins. Perhaps this validation should happen inside https://github.com/TBD54566975/ftl/blob/28ac3300f5d357b2048c018a5afefb24babfe985/frontend/cli/cmd_new.go#L78
@AlexSzlavik AlexSzlavik added the dx label Oct 8, 2024
@github-actions github-actions bot added the triage Issue needs triaging label Oct 8, 2024
This was referenced Oct 8, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Oct 8, 2024
AlexSzlavik added a commit that referenced this issue Oct 8, 2024
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant