Skip to content

Commit

Permalink
Merge pull request #5091 from tomarad/main
Browse files Browse the repository at this point in the history
Fix lock -r warning being logged to stdout instead of stderr
  • Loading branch information
matteius authored May 2, 2022
2 parents 107925f + 470acd3 commit 5b64a6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions news/5091.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes issue of ``pipenv lock -r`` command printing to stdout instead of stderr.
13 changes: 6 additions & 7 deletions pipenv/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,13 @@ def lock(ctx, state, **kwargs):
pre = state.installstate.pre
if emit_requirements:
secho(
"""
Warning: The lock flag -r/--requirements will be deprecated in a future version
of pipenv in favor of the new requirements command. For more info see
https://pipenv.pypa.io/en/latest/advanced/#generating-a-requirements-txt
NOTE: the requirements command parses Pipfile.lock directly without performing any
locking operations. Updating packages should be done by running pipenv lock
""",
"Warning: The lock flag -r/--requirements will be deprecated in a future version\n"
"of pipenv in favor of the new requirements command. For more info see\n"
"https://pipenv.pypa.io/en/latest/advanced/#generating-a-requirements-txt\n"
"NOTE: the requirements command parses Pipfile.lock directly without performing any\n"
"locking operations. Updating packages should be done by running pipenv lock.",
fg="yellow",
err=True,
)
# Emit requirements file header (unless turned off with --no-header)
if state.lockoptions.emit_requirements_header:
Expand Down

0 comments on commit 5b64a6d

Please sign in to comment.