mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-22 07:12:12 +01:00
fix: delete other files/folder in downloads: #57
This commit is contained in:
parent
ff06cde662
commit
9d3c21d16b
@ -13,7 +13,7 @@ A dagger sdk written in rust for rust.
|
|||||||
- [ ] Start MkBook on how to actually use the sdk
|
- [ ] Start MkBook on how to actually use the sdk
|
||||||
- [ ] Update to newest upstream release
|
- [ ] Update to newest upstream release
|
||||||
- [ ] Fix bugs
|
- [ ] Fix bugs
|
||||||
- [ ] Run in conjunction with golang and other sdks
|
- [x] Run in conjunction with golang and other sdks
|
||||||
- [ ] Stabilize the initial `Arc<Query>` model into something more extensible
|
- [ ] Stabilize the initial `Arc<Query>` model into something more extensible
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
@ -135,20 +135,6 @@ impl Downloader {
|
|||||||
.context("failed to download CLI from archive")?;
|
.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)
|
Ok(cli_bin_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user