Skip to content

Commit 09be0ee

Browse files
committed
Fixed cargo uninstall behavior in Windows
1 parent 9b13310 commit 09be0ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo/ops/cargo_uninstall.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,13 @@ fn uninstall_pkgid(
146146
}
147147
tracker.remove(pkgid, &bins);
148148
}
149-
tracker.save()?;
149+
150150
for bin in to_remove {
151151
config.shell().status("Removing", bin.display())?;
152152
paths::remove_file(bin)?;
153153
}
154154

155+
// Only Save the tracker when remove Bin successfully.
156+
tracker.save()?;
155157
Ok(())
156158
}

0 commit comments

Comments
 (0)