Skip to content

Commit

Permalink
Do not lock or sync when running in outdated mode (#5875)
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Aug 28, 2023
1 parent 413675f commit 47ead91
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions pipenv/routines/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def do_update(
)
packages = [p for p in packages if p]
editable = [p for p in editable_packages if p]
if not outdated:
outdated = bool(dry_run)
if not packages:
click.echo(
"{} {} {} {}{}".format(
Expand All @@ -59,7 +61,7 @@ def do_update(
clear=clear,
pre=pre,
pypi_mirror=pypi_mirror,
write=not quiet,
write=not outdated,
)
else:
upgrade(
Expand All @@ -75,28 +77,26 @@ def do_update(
lock_only=lock_only,
)

if not outdated:
outdated = bool(dry_run)
if outdated:
do_outdated(
project,
clear=clear,
pre=pre,
pypi_mirror=pypi_mirror,
)

do_sync(
project,
dev=dev,
categories=categories,
python=python,
bare=bare,
user=False,
clear=clear,
unused=False,
pypi_mirror=pypi_mirror,
extra_pip_args=extra_pip_args,
)
else:
do_sync(
project,
dev=dev,
categories=categories,
python=python,
bare=bare,
user=False,
clear=clear,
unused=False,
pypi_mirror=pypi_mirror,
extra_pip_args=extra_pip_args,
)


def upgrade(
Expand Down

0 comments on commit 47ead91

Please sign in to comment.