Cannot run `cargo tarpaulin --doc` without `rustup`
Nemo157 opened this issue · 3 comments
Nemo157 commented
Describe the bug
When attempting to run cargo tarpaulin --doc
without rustup
installed, it fails because it passes +nightly
to cargo
.
To Reproduce
# install a nightly rust toolchain without rustup, e.g. through `nix`
> cargo tarpaulin --doc
Feb 08 17:23:14.191 INFO cargo_tarpaulin::config: Creating config
Feb 08 17:23:14.259 INFO cargo_tarpaulin: Running Tarpaulin
Feb 08 17:23:14.259 INFO cargo_tarpaulin: Building project
Feb 08 17:23:14.259 INFO cargo_tarpaulin::cargo: Cleaning project
error: no such command: `+nightly`
Cargo does not handle `+toolchain` directives.
Did you mean to invoke `cargo` through `rustup` instead?
Feb 08 17:23:14.410 ERROR cargo_tarpaulin::cargo: Building doctests failed
Feb 08 17:23:14.410 ERROR cargo_tarpaulin: Cargo failed to run! Error: Building doctest failed
Error: "Cargo failed to run! Error: Building doctest failed"
Expected behavior
It to work, since I'm already using a nightly toolchain.
xd009642 commented
It's been a while since an assumption has come back to bite me like this! I've pushed a potential fix to the branch issue/1472
if you have some time to test it let me know (I'll also open a PR for it right now)
Nemo157 commented
Yep, that works (at least, it starts the build and hits some ICE caused by -Zbuild-std
that I'm still diagnosing).
xd009642 commented
Cool I'll merge it in then, I'll also try and see if there's any other fixes I can fit in quickly and cut a release today or tomorrow