mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05: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
1 changed files with 7 additions and 2 deletions
|
@ -972,8 +972,13 @@ fn check_exe(exe_path: &Path) -> Result<(), AnyError> {
|
||||||
.arg("-V")
|
.arg("-V")
|
||||||
.stderr(std::process::Stdio::inherit())
|
.stderr(std::process::Stdio::inherit())
|
||||||
.output()?;
|
.output()?;
|
||||||
assert!(output.status.success());
|
if !output.status.success() {
|
||||||
Ok(())
|
bail!(
|
||||||
|
"Failed to validate Deno executable. This may be because your OS is unsupported or the executable is corrupted"
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
Loading…
Reference in a new issue