Closed jyn514 closed 1 year ago
@holmgr would it be possible to take a look at this PR? Ever since I've installed cargo-sweep I cannot use the -i
option because of this issue.
@elpiel FYI I am the current maintainer of cargo-sweep. I plan to add tests for cargo-sweep before I merge this, since it has a lot of functionality and I've never used more than one or two flags. See https://github.com/holmgr/cargo-sweep/pull/63#issuecomment-1213585613.
Awesome! 🚀
Previously, cargo sweep would unconditionally give an error when it couldn't determine the fingerprint. But for custom toolchains, it makes sense for it to be linked but give an error when you try to run it: it means the compiler hasn't yet been built.
Rather than aborting straight away, treat the toolchain as if it isn't installed and clean its artifacts.
This also gives a significantly better error message if cargo-sweep can't determine the fingerprint (which can still happen in practice if you've managed to really mess up one of your toolchains). Before:
After:
Fixes https://github.com/holmgr/cargo-sweep/issues/65.