Skip to content

Commit

Permalink
Updated version check to add python path
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Nov 30, 2024
1 parent 204c65f commit 813df44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions osxphotos/cli/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def check_version():
if latest_version and version.parse(latest_version) > version.parse(__version__):
click.echo(
f"New version {latest_version} available; you are running {__version__}\n"
"Run `pipx upgrade osxphotos` to upgrade.\n"
"Use --no-version-check or set environment variable OSXPHOTOS_NO_VERSION_CHECK=1 "
"to suppress this message and prevent osxphotos from checking for latest version.",
err=True,
Expand All @@ -124,5 +123,9 @@ def print_version(ctx, param, value):
return
click.echo(f"osxphotos, version {__version__}")
click.echo(f"Python {sys.version}")
click.echo(f"macOS {'.'.join(get_macos_version())}, {platform.machine()}")
click.echo(f"Python executable: {sys.executable}")
if sys.platform.lower() == "darwin":
click.echo(f"macOS {'.'.join(get_macos_version())}, {platform.machine()}")
else:
click.echo(f"{sys.platform} {platform.machine()}")
ctx.exit()
1 change: 0 additions & 1 deletion osxphotos/cli/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def version(ctx, cli_obj, run):
) > packaging.version.parse(__version__):
click.echo(
f"A new version of osxphotos is available: {latest_version} (you have {__version__})\n"
"Run `pipx upgrade osxphotos` to upgrade (assuming you installed osxphotos with pipx).\n"
f"See {OSXPHOTOS_URL} for more information."
)
if run:
Expand Down

0 comments on commit 813df44

Please sign in to comment.