mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 04:51:22 +00:00
fix(upgrade): better error message when check_exe fails (#25133)
Fixes https://github.com/denoland/deno/issues/24971 Fixes the panic. We can give a more personalized error by checking the macOS version but probably not worth the effort.
This commit is contained in:
parent
76990df6fa
commit
e2c50f7e8a
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user