Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7343020
D5368.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
548 B
Subscribers
None
D5368.id.diff
View Options
diff --git a/swh/scanner/cli.py b/swh/scanner/cli.py
--- a/swh/scanner/cli.py
+++ b/swh/scanner/cli.py
@@ -9,6 +9,7 @@
from typing import Any, Dict, Optional
import click
+from importlib_metadata import version
import yaml
from swh.core import config
@@ -69,6 +70,9 @@
type=click.Path(exists=False, dir_okay=False, path_type=str),
help="""YAML configuration file""",
)
+@click.version_option(
+ version=version("swh-scanner"), prog_name="swh-scanner",
+)
@click.pass_context
def scanner(ctx, config_file: Optional[str]):
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 17 2025, 6:46 PM (7 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217035
Attached To
D5368: CLI: Add --version
Event Timeline
Log In to Comment