diff options
-rw-r--r-- | cli/tools/upgrade.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs index db43b8be1..50d6395fc 100644 --- a/cli/tools/upgrade.rs +++ b/cli/tools/upgrade.rs @@ -972,8 +972,13 @@ fn check_exe(exe_path: &Path) -> Result<(), AnyError> { .arg("-V") .stderr(std::process::Stdio::inherit()) .output()?; - assert!(output.status.success()); - Ok(()) + if !output.status.success() { + bail!( + "Failed to validate Deno executable. This may be because your OS is unsupported or the executable is corrupted" + ) + } else { + Ok(()) + } } #[derive(Debug)] |