Skip to content

Commit

Permalink
update: Print Pipx-specific update instructions for the CLI
Browse files Browse the repository at this point in the history
Pipx keeps track of extra metadata, so simply using the Python in the
virtualenv isn't enough.
  • Loading branch information
tsibley committed Jun 2, 2020
1 parent 589c517 commit e9042b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nextstrain/cli/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ def check_for_new_version():
print()
print("Upgrade by running:")
print()
print(" " + python + " -m pip install --user --upgrade nextstrain-cli" if installed_into_user_site else \
" " + python + " -m pip install --upgrade nextstrain-cli")
if "/pipx/venvs/nextstrain-cli/" in python:
print(" pipx upgrade nextstrain-cli")
else:
print(" " + python + " -m pip install --user --upgrade nextstrain-cli" if installed_into_user_site else \
" " + python + " -m pip install --upgrade nextstrain-cli")
print()
else:
print("nextstrain-cli is up to date!")
Expand Down

0 comments on commit e9042b1

Please sign in to comment.