Skip to content

Commit

Permalink
Added -v, --version command line option
Browse files Browse the repository at this point in the history
  • Loading branch information
pickworthi committed Nov 13, 2024
1 parent 223cd9e commit c547fe2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def parse_args() -> Namespace | tuple[str, list[str]]: # noqa: D103
),
formatter_class=RawTextHelpFormatter,
)
parser.add_argument("-v", "--version", action='store_true',
help="show the version and exit"
)
parser.add_argument(
"--config", help=("path to TOML file (requires Python 3.11+)")
)
Expand All @@ -77,6 +80,11 @@ def parse_args() -> Namespace | tuple[str, list[str]]: # noqa: D103
parser.print_help(sys.stderr)
sys.exit(1)

c_args = parser.parse_args()
if c_args.version:
print(f"umu-launcher version {__version__} ({sys.version})", file=sys.stderr)
sys.exit(1)

# Winetricks
# Exit if no winetricks verbs were passed
if sys.argv[1].endswith("winetricks") and not sys.argv[2:]:
Expand Down

0 comments on commit c547fe2

Please sign in to comment.