Skip to content

Commit

Permalink
feat: Do not fetch package hashes when --frozen-lockfile is passed
Browse files Browse the repository at this point in the history
Close #2630

Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Feb 22, 2024
1 parent ddd2687 commit 0275813
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/2630.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not fetch package hashes when `--frozen-lockfile` is passed.
5 changes: 3 additions & 2 deletions src/pdm/cli/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ def do_lock(
resolve_max_rounds,
inherit_metadata=FLAG_INHERIT_METADATA in lock_strategy,
)
spin.update("Fetching hashes for resolved packages...")
fetch_hashes(provider.repository, mapping)
if project.enable_write_lockfile:
spin.update("Fetching hashes for resolved packages...")
fetch_hashes(provider.repository, mapping)
except ResolutionTooDeep:
ui.echo(f"{termui.Emoji.LOCK} Lock failed", err=True)
ui.echo(
Expand Down

0 comments on commit 0275813

Please sign in to comment.