From 1f058a839d5b456b1176b818ecd6cabcc1404479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boni=20Garc=C3=ADa?= Date: Wed, 27 Mar 2024 02:06:40 +0100 Subject: [PATCH] [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 --- rust/src/files.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/src/files.rs b/rust/src/files.rs index a27e17650764d..3764dd0d58325 100644 --- a/rust/src/files.rs +++ b/rust/src/files.rs @@ -273,8 +273,10 @@ pub fn uncompress_deb( opt_edge_str, target_str )); create_parent_path_if_not_exists(target)?; - let output = run_shell_command_by_os(os, command)?; - if output.is_empty() { + run_shell_command_by_os(os, command)?; + let target_path = Path::new(target); + if target_path.parent().unwrap().read_dir()?.next().is_none() { + println!("IS EMPTY"); fs::rename(&opt_edge_str, &target_str)?; }