Add a version command line option.

This commit is contained in:
Andrew Hamilton 2021-12-22 21:11:21 +10:00
parent 949f5f6d24
commit a005174e1a

View file

@ -51,6 +51,7 @@ Usage:
eris -h | --help
eris -i | --info
eris -a | --apt-install-tools
eris --version
Example:
# eris my_project
@ -1132,6 +1133,9 @@ def check_arguments():
if arguments["--help"]:
print(cmdline_help)
sys.exit(0)
if arguments["--version"]:
print(eris.__version__)
sys.exit(0)
if arguments["--config"] is not None:
config_path = arguments["--config"]
if not os.path.exists(config_path):