mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-07 20:50:03 +00:00
Fix opts.no_cleanup
behavior
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
b223990bb1
commit
c6281d8ea0
1 changed files with 4 additions and 1 deletions
|
@ -319,7 +319,10 @@ async fn entry() -> Result<()> {
|
||||||
await_task(task).await?;
|
await_task(task).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if !opts.no_cleanup {
|
if opts.no_cleanup {
|
||||||
|
// Consume temp_dir without removing it from fs.
|
||||||
|
temp_dir.into_path();
|
||||||
|
} else {
|
||||||
temp_dir.close().unwrap_or_else(|err| {
|
temp_dir.close().unwrap_or_else(|err| {
|
||||||
warn!("Failed to clean up some resources: {err}");
|
warn!("Failed to clean up some resources: {err}");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue