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

flit with no arguments throws instead of printing useful info #342

Closed
mikebentley15 opened this issue Nov 14, 2024 · 0 comments · Fixed by #343
Closed

flit with no arguments throws instead of printing useful info #342

mikebentley15 opened this issue Nov 14, 2024 · 0 comments · Fixed by #343

Comments

@mikebentley15
Copy link
Collaborator

Bug Report

Description

When you run flit with no arguments, an exception is thrown

Traceback (most recent call last):
  File "/Users/michael.bentley/bin/flit", line 250, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/Users/michael.bentley/bin/flit", line 187, in main
    return _main_impl(arguments, module_dir, prog=prog)
  File "/Users/michael.bentley/bin/flit", line 246, in _main_impl
    subcommand = subcommand_map[args.subcommand]
KeyError: None

This isn't super helpful

Suggested Fix

Print the same documentation as flit --help.

Alternative approaches:

Print an error and suggest calling flit --help or flit help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant