fix: add --version option to Click CLI group
Some checks failed
Some checks failed
- 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:
@@ -1,20 +1,4 @@
|
|||||||
"""Main CLI entry point."""
|
|
||||||
|
|
||||||
from loglens.cli.commands import main
|
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__":
|
if __name__ == "__main__":
|
||||||
sys.exit(main_cli())
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user