summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-01-22 16:31:12 -0500
committerGitHub <noreply@github.com>2024-01-22 22:31:12 +0100
commit69d5f136badfd7cfa9b979ff2fee7caf397098ca (patch)
tree665c6686fbf6f0732d84984f5f48557e45b4c7b6 /cli/main.rs
parentd20c9e75d1540b1a27e721d0cf66d29ba6a2c3fb (diff)
feat(lockfile): track JSR and npm dependencies in config file (#22004)
See overview in https://github.com/denoland/deno_lockfile/pull/13
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/cli/main.rs b/cli/main.rs
index cd065f81e..fb88ad137 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -38,6 +38,7 @@ use deno_core::error::AnyError;
use deno_core::error::JsError;
use deno_core::futures::FutureExt;
use deno_core::unsync::JoinHandle;
+use deno_npm::resolution::SnapshotFromLockfileError;
use deno_runtime::colors;
use deno_runtime::fmt_errors::format_js_error;
use deno_runtime::tokio_util::create_and_run_current_thread_with_maybe_metrics;
@@ -261,7 +262,14 @@ fn unwrap_or_exit<T>(result: Result<T, AnyError>) -> T {
if let Some(e) = error.downcast_ref::<JsError>() {
error_string = format_js_error(e);
- } else if let Some(e) = error.downcast_ref::<args::LockfileError>() {
+ } else if let Some(args::LockfileError::IntegrityCheckFailed(e)) =
+ error.downcast_ref::<args::LockfileError>()
+ {
+ error_string = e.to_string();
+ error_code = 10;
+ } else if let Some(SnapshotFromLockfileError::IntegrityCheckFailed(e)) =
+ error.downcast_ref::<SnapshotFromLockfileError>()
+ {
error_string = e.to_string();
error_code = 10;
}