Skip to content

Fix bare -v to show version and exit#220

Open
ReinerBRO wants to merge 1 commit intohttpie:masterfrom
ReinerBRO:fix/209-short-version-flag
Open

Fix bare -v to show version and exit#220
ReinerBRO wants to merge 1 commit intohttpie:masterfrom
ReinerBRO:fix/209-short-version-flag

Conversation

@ReinerBRO
Copy link
Copy Markdown

Summary

  • treat a bare -v invocation as a version shortcut and exit immediately
  • keep existing startup behavior unchanged for normal interactive runs
  • add a focused CLI test for -v

Why

Issue #209 reports that http-prompt -v prints a version banner but still launches interactive mode. This patch fixes that specific path with minimal behavior change.

Tests

  • . .venv/bin/activate && python -m pytest tests/test_cli.py -k short_version_option -q
  • . .venv/bin/activate && python -m pytest tests/test_cli.py -k "short_version_option or without_args" -q
  • . .venv/bin/activate && http-prompt -v

Closes #209

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

The command line param -v show the version but launch the cli

1 participant