Skip to content

Commit 0dd9ee7

Browse files
committed
Add --version option
Prints version information and exits. Signed-off-by: John Pennycook <john.pennycook@intel.com>
1 parent 2500ea9 commit 0dd9ee7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/codebasin

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ def guess_project_name(config_path):
4141
def main():
4242
# Read command-line arguments
4343
parser = argparse.ArgumentParser(
44-
description="Code Base Investigator v" + str(version),
44+
description="Code Base Investigator " + str(version),
45+
)
46+
parser.add_argument(
47+
"--version",
48+
action="version",
49+
version=f"Code Base Investigator {version}",
50+
help="Display version information and exit.",
4551
)
4652
deprecated_args = parser.add_argument_group("deprecated options")
4753
deprecated_args.add_argument(

0 commit comments

Comments
 (0)