mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -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")
|
||||
.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 a new issue