mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
ref(cli): Add better error message when powershell is missing during upgrade (#17759)
Closes https://github.com/denoland/deno/issues/17756
This commit is contained in:
parent
0aeb8bc759
commit
6e1b737400
1 changed files with 12 additions and 2 deletions
|
@ -511,7 +511,17 @@ pub fn unpack_into_dir(
|
|||
.arg(format!("'{}'", &archive_path.to_str().unwrap()))
|
||||
.arg("-DestinationPath")
|
||||
.arg(format!("'{}'", &temp_dir_path.to_str().unwrap()))
|
||||
.spawn()?
|
||||
.spawn()
|
||||
.map_err(|err| {
|
||||
if err.kind() == std::io::ErrorKind::NotFound {
|
||||
std::io::Error::new(
|
||||
std::io::ErrorKind::NotFound,
|
||||
"`powershell.exe` was not found in your PATH",
|
||||
)
|
||||
} else {
|
||||
err
|
||||
}
|
||||
})?
|
||||
.wait()?
|
||||
}
|
||||
"zip" => {
|
||||
|
@ -524,7 +534,7 @@ pub fn unpack_into_dir(
|
|||
if err.kind() == std::io::ErrorKind::NotFound {
|
||||
std::io::Error::new(
|
||||
std::io::ErrorKind::NotFound,
|
||||
"`unzip` was not found on your PATH, please install `unzip`",
|
||||
"`unzip` was not found in your PATH, please install `unzip`",
|
||||
)
|
||||
} else {
|
||||
err
|
||||
|
|
Loading…
Add table
Reference in a new issue