Skip to content

Commit

Permalink
unify logs
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Apr 20, 2024
1 parent 48079a2 commit ff3543f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/pipx/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def install_all(
else:
installed.append(venv_dir.name)
if len(installed) == 0:
print(f"{sleep} No packages installed after running 'pipx install-all {spec_metadata_file}'")
print(f"No packages installed after running 'pipx install-all {spec_metadata_file}' {sleep}")
if len(failed) > 0:
raise PipxError(f"The following package(s) failed to install: {', '.join(failed)}")
# Any failure to install will raise PipxError, otherwise success
Expand Down
4 changes: 4 additions & 0 deletions src/pipx/commands/reinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def reinstall_all(
) -> ExitCode:
"""Returns pipx exit code."""
failed: List[str] = []
reinstalled: List[str] = []

# iterate on all packages and reinstall them
# for the first one, we also trigger
Expand All @@ -134,6 +135,9 @@ def reinstall_all(
failed.append(venv_dir.name)
else:
first_reinstall = False
reinstalled.append(venv_dir.name)
if len(reinstalled) == 0:
print(f"No packages reinstalled after running 'pipx reinstall-all' {sleep}")
if len(failed) > 0:
raise PipxError(f"The following package(s) failed to reinstall: {', '.join(failed)}")
# Any failure to install will raise PipxError, otherwise success
Expand Down

0 comments on commit ff3543f

Please sign in to comment.