Skip to content

Commit

Permalink
core: fix bug introduced with rich.console
Browse files Browse the repository at this point in the history
The status object isn't callable. Instead one should use
the update method, or the print method of the console object.
  • Loading branch information
oz123 committed Nov 30, 2022
1 parent c6441f8 commit 1e60aed
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ def abort(msg=""):
click.style("...", bold=True),
)
)
# TOOD: pass project settings to console.status
with console.status("Installing python...") as st:
with console.status(
"Installing python...", spinner=project.s.PIPENV_SPINNER
):
try:
c = installer.install(version)
except InstallerError as e:
Expand All @@ -416,7 +417,9 @@ def abort(msg=""):
click.echo(fix_utf8("Something went wrong..."), err=True)
click.secho(e.err, fg="cyan", err=True)
else:
st(environments.PIPENV_SPINNER_OK_TEXT.format("Success!"))
console.print(
environments.PIPENV_SPINNER_OK_TEXT.format("Success!")
)
# Print the results, in a beautiful blue...
click.secho(c.stdout, fg="cyan", err=True)
# Clear the pythonfinder caches
Expand Down

0 comments on commit 1e60aed

Please sign in to comment.