Skip to content

Commit

Permalink
Fixed cargo uninstall behavior in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
linyihai committed Nov 28, 2023
1 parent 9b13310 commit 09be0ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cargo/ops/cargo_uninstall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,13 @@ fn uninstall_pkgid(
}
tracker.remove(pkgid, &bins);
}
tracker.save()?;

for bin in to_remove {
config.shell().status("Removing", bin.display())?;
paths::remove_file(bin)?;
}

// Only Save the tracker when remove Bin successfully.
tracker.save()?;
Ok(())
}

0 comments on commit 09be0ee

Please sign in to comment.