fix: add --version option to Click CLI group
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled

- Added @click.version_option decorator to main() in commands.py
- Imported __version__ from loglens package
- Resolves CI build failure: 'loglens --version' command not found
This commit is contained in:
2026-02-02 09:25:04 +00:00
parent 91237edcb0
commit 874d632726

View File

@@ -1,20 +1,4 @@
"""Main CLI entry point."""
from loglens.cli.commands import main
import sys
def main_cli() -> int:
"""Main entry point for LogLens CLI."""
try:
return main(standalone_mode=False)
except SystemExit:
raise
except Exception as e:
print(f"Error: {e}", file=sys.stderr)
return 1
if __name__ == "__main__":
sys.exit(main_cli())
main()