Skip to content

Commit 686b3c9

Browse files
committed
feat(space): remove unused zip after download
1 parent d0e6b26 commit 686b3c9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/utils/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ pub use self::command::use_bun;
66
pub use self::utils::download_zip;
77
pub use self::utils::get_architecture;
88
pub use self::utils::unzip_file;
9-
pub use self::utils::check_folder_exists;
9+
pub use self::utils::check_folder_exists;
10+
pub use self::command::FOLDER_VERSION_BASE;

src/utils/utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use std::error::Error as StdError; // Import std::error::Error
99
use std::path::{Path, PathBuf};
1010
use std::error::Error;
1111

12-
1312
pub fn get_architecture() -> &'static str {
1413
let output = Command::new("uname")
1514
.arg("-ms")
@@ -86,6 +85,8 @@ pub async fn unzip_file(zip_file_path: &str, output_dir: &str) -> Result<(), Box
8685

8786
}
8887
}
88+
89+
let _ = fs::remove_file(zip_file_path);
8990
Ok(())
9091
}
9192

0 commit comments

Comments
 (0)