Skip to content

Commit 4a369a7

Browse files
authored
Merge pull request #83 from Pennycook/version-option
Add --version option
2 parents 8b1efde + 0dd9ee7 commit 4a369a7

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)