Skip to content

Commit 1f058a8

Browse files
authored
[rust] Enhance logic to uncompress DEB files and set toolchain version (#13741)
* [rust] Enhance logic to uncompress DEB files and set toolchain version * [rust] Updata checksum in lock file * [rust] Remove toolchain version from WORKSPACE * [rust] Update again checksum in lock file
1 parent fbf75fd commit 1f058a8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rust/src/files.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,10 @@ pub fn uncompress_deb(
273273
opt_edge_str, target_str
274274
));
275275
create_parent_path_if_not_exists(target)?;
276-
let output = run_shell_command_by_os(os, command)?;
277-
if output.is_empty() {
276+
run_shell_command_by_os(os, command)?;
277+
let target_path = Path::new(target);
278+
if target_path.parent().unwrap().read_dir()?.next().is_none() {
279+
println!("IS EMPTY");
278280
fs::rename(&opt_edge_str, &target_str)?;
279281
}
280282

0 commit comments

Comments
 (0)