diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-01 00:07:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 00:07:36 +0100 |
commit | 89c5aa85984eabd300818f8275e3970f12a89754 (patch) | |
tree | fcebd710f4d4015ffdc022f1c78574de78ab29e9 /cli/proc_state.rs | |
parent | cb08b4683fc3a8feadc4a7590dc2db922ca3a6ed (diff) |
fix(lock): Additive lock file (#16500)
This commit changes lockfile to be "additive" - ie. integrity check only fails if
file/package is already specified in the lockfile, but its integrity doesn't match.
If file/package is not present in the lockfile, it will be added to the lockfile and
the lockfile will be written to disk.
Diffstat (limited to 'cli/proc_state.rs')
-rw-r--r-- | cli/proc_state.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/proc_state.rs b/cli/proc_state.rs index c82743a4e..d62bf1f5a 100644 --- a/cli/proc_state.rs +++ b/cli/proc_state.rs @@ -236,7 +236,8 @@ impl ProcState { cli_options.cache_setting(), progress_bar.clone(), ); - let maybe_lockfile = lockfile.as_ref().filter(|l| !l.lock().write).cloned(); + let maybe_lockfile = + lockfile.as_ref().filter(|l| !l.lock().overwrite).cloned(); let mut npm_resolver = NpmPackageResolver::new( npm_cache.clone(), api, |