summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tools/upgrade.rs29
1 files changed, 7 insertions, 22 deletions
diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs
index 366cc7fc4..04332f5df 100644
--- a/cli/tools/upgrade.rs
+++ b/cli/tools/upgrade.rs
@@ -481,7 +481,7 @@ async fn download_package(
match maybe_bytes {
Some(bytes) => Ok(bytes),
None => {
- log::info!("Download could not be found, aborting");
+ log::error!("Download could not be found, aborting");
std::process::exit(1)
}
}
@@ -506,32 +506,17 @@ pub fn unpack_into_dir(
let unpack_status = match archive_ext {
"zip" if cfg!(windows) => {
fs::write(&archive_path, &archive_data)?;
- Command::new("powershell.exe")
- .arg("-NoLogo")
- .arg("-NoProfile")
- .arg("-NonInteractive")
- .arg("-Command")
- .arg(
- "& {
- param($Path, $DestinationPath)
- trap { $host.ui.WriteErrorLine($_.Exception); exit 1 }
- Add-Type -AssemblyName System.IO.Compression.FileSystem
- [System.IO.Compression.ZipFile]::ExtractToDirectory(
- $Path,
- $DestinationPath
- );
- }",
- )
- .arg("-Path")
- .arg(format!("'{}'", &archive_path.to_str().unwrap()))
- .arg("-DestinationPath")
- .arg(format!("'{}'", &temp_dir_path.to_str().unwrap()))
+ Command::new("tar.exe")
+ .arg("xf")
+ .arg(&archive_path)
+ .arg("-C")
+ .arg(temp_dir_path)
.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",
+ "`tar.exe` was not found in your PATH",
)
} else {
err