From 9d3c21d16b4a64eb7a7b1888365a4c4ea56d7225 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 25 Apr 2023 08:33:43 +0200 Subject: [PATCH] fix: delete other files/folder in downloads: #57 --- README.md | 2 +- crates/dagger-core/src/downloader.rs | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/README.md b/README.md index f6681ba..209951e 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A dagger sdk written in rust for rust. - [ ] Start MkBook on how to actually use the sdk - [ ] Update to newest upstream release - [ ] Fix bugs - - [ ] Run in conjunction with golang and other sdks + - [x] Run in conjunction with golang and other sdks - [ ] Stabilize the initial `Arc` model into something more extensible ## Examples diff --git a/crates/dagger-core/src/downloader.rs b/crates/dagger-core/src/downloader.rs index 26fdf36..ddf2bb8 100644 --- a/crates/dagger-core/src/downloader.rs +++ b/crates/dagger-core/src/downloader.rs @@ -135,20 +135,6 @@ impl Downloader { .context("failed to download CLI from archive")?; } - for file in self.cache_dir()?.read_dir()? { - if let Ok(entry) = file { - let path = entry.path(); - if path != cli_bin_path { - tracing::debug!( - path = path.display().to_string(), - cli_bin_path = cli_bin_path.display().to_string(), - "deleting existing dagger-engine" - ); - std::fs::remove_file(path)?; - } - } - } - Ok(cli_bin_path) }