mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Fixed cargo uninstall
behavior in Windows
This commit is contained in:
parent
9b13310ca5
commit
09be0eef54
@ -146,11 +146,13 @@ fn uninstall_pkgid(
|
|||||||
}
|
}
|
||||||
tracker.remove(pkgid, &bins);
|
tracker.remove(pkgid, &bins);
|
||||||
}
|
}
|
||||||
tracker.save()?;
|
|
||||||
for bin in to_remove {
|
for bin in to_remove {
|
||||||
config.shell().status("Removing", bin.display())?;
|
config.shell().status("Removing", bin.display())?;
|
||||||
paths::remove_file(bin)?;
|
paths::remove_file(bin)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only Save the tracker when remove Bin successfully.
|
||||||
|
tracker.save()?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user