Skip to content

fix: handle cli help command - #10289

Open
Subodh-17 wants to merge 1 commit into
modelscope:mainfrom
Subodh-17:feat/fix-cli-help
Open

Subodh-17 wants to merge 1 commit into
modelscope:mainfrom
Subodh-17:feat/fix-cli-help

Conversation

@Subodh-17

Copy link
Copy Markdown

Summary

  • handle --help before CLI route lookup
  • avoid accidental KeyError/IndexError for help and empty invocation
  • add regression coverage for CLI argument handling

Tests

  • test_cli_help: verified --help does not raise KeyError and exits successfully
  • test_cli_no_args: verified empty command does not raise IndexError
  • test_cli_unknown_command: verified unknown command raises sensible error
  • test_cli_valid_command: verified valid command successfully resolves route

Closes #10287

This branch has not been deployed

No deployments
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 this pull request may close these issues.

[Bug] swift --help raises KeyError instead of showing CLI help

2 participants