summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-28 14:58:43 -0400
committerGitHub <noreply@github.com>2024-05-28 14:58:43 -0400
commit448fe67b7a2142f62332b651f9d215534dceb1f5 (patch)
tree3cfc763f39bf275a537e6228767b3e43866f5d0f /cli/worker.rs
parentcd8f5f53f7616e4c74de0f1ff5eadd6ef024118a (diff)
feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979)
Includes: * https://github.com/denoland/deno_graph/pull/486 * https://github.com/denoland/deno_graph/pull/488 * https://github.com/denoland/deno_lockfile/pull/25 * https://github.com/denoland/deno_lockfile/pull/22 * https://github.com/denoland/deno_graph/pull/483 * https://github.com/denoland/deno_graph/pull/470
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/cli/worker.rs b/cli/worker.rs
index bfdeb3568..833f3d543 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -7,7 +7,6 @@ use std::sync::Arc;
use deno_ast::ModuleSpecifier;
use deno_core::anyhow::bail;
-use deno_core::anyhow::Context;
use deno_core::error::AnyError;
use deno_core::futures::FutureExt;
use deno_core::parking_lot::Mutex;
@@ -48,6 +47,7 @@ use deno_terminal::colors;
use tokio::select;
use crate::args::package_json::PackageJsonDeps;
+use crate::args::write_lockfile_if_has_changes;
use crate::args::DenoSubcommand;
use crate::args::StorageKeyResolver;
use crate::errors;
@@ -533,10 +533,7 @@ impl CliMainWorkerFactory {
// For npm binary commands, ensure that the lockfile gets updated
// so that we can re-use the npm resolution the next time it runs
// for better performance
- lockfile
- .lock()
- .write()
- .context("Failed writing lockfile.")?;
+ write_lockfile_if_has_changes(&lockfile.lock())?;
}
(node_resolution.into_url(), is_main_cjs)