Skip to content

Commit f1f035f

Browse files
committed
Remove click.echo from venv_resolve_deps
1 parent af32776 commit f1f035f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pipenv/utils/resolver.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from pipenv.utils import console, err
3030
from pipenv.utils.fileutils import create_tracked_tempdir
3131
from pipenv.utils.requirements import normalize_name
32-
from pipenv.vendor import click
3332

3433
from .dependencies import (
3534
HackedPythonVersion,
@@ -864,8 +863,8 @@ def venv_resolve_deps(
864863
with open(target_file.name) as fh:
865864
results = json.load(fh)
866865
except (IndexError, json.JSONDecodeError):
867-
click.echo(c.stdout.strip(), err=True)
868-
click.echo(c.stderr.strip(), err=True)
866+
err.print(c.stdout.strip())
867+
err.print(c.stderr.strip())
869868
if os.path.exists(target_file.name):
870869
os.unlink(target_file.name)
871870
raise RuntimeError("There was a problem with locking.")
@@ -875,13 +874,15 @@ def venv_resolve_deps(
875874
environments.PIPENV_SPINNER_OK_TEXT.format("Success!")
876875
)
877876
if not project.s.is_verbose() and c.stderr.strip():
878-
click.echo(click.style(f"Warning: {c.stderr.strip()}"), err=True)
877+
err.print(
878+
f"Warning: {c.stderr.strip()}", overflow="ignore", crop=False
879+
)
879880
else:
880881
st.console.print(
881882
environments.PIPENV_SPINNER_FAIL_TEXT.format("Locking Failed!")
882883
)
883-
click.echo(f"Output: {c.stdout.strip()}", err=True)
884-
click.echo(f"Error: {c.stderr.strip()}", err=True)
884+
err.print(f"Output: {c.stdout.strip()}")
885+
err.print(f"Error: {c.stderr.strip()}")
885886
if lockfile_section not in lockfile:
886887
lockfile[lockfile_section] = {}
887888
return prepare_lockfile(

0 commit comments

Comments
 (0)