Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rust] Enhance logic to uncompress DEB files and set toolchain version #13741

Merged
merged 4 commits into from Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions rust/src/files.rs
Expand Up @@ -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)?;
}

Expand Down