Do not lock or sync when running in outdated mode (#5875)

This commit is contained in:
Matt Davis
2023-08-28 19:52:47 -04:00
committed by GitHub
parent 413675fd33
commit 47ead915a3
+16 -16
View File
@@ -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(
@@ -59,7 +61,7 @@ def do_update(
clear=clear,
pre=pre,
pypi_mirror=pypi_mirror,
write=not quiet,
write=not outdated,
)
else:
upgrade(
@@ -75,8 +77,6 @@ def do_update(
lock_only=lock_only,
)
if not outdated:
outdated = bool(dry_run)
if outdated:
do_outdated(
project,
@@ -84,19 +84,19 @@ def do_update(
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(