Closed andriyDev closed 5 months ago
This should only happen if you have the RUSTUP_TOOLCHAIN
env var set. Which would imply that you're using rustup and +
directives should work.
Just wondering do you handle your rust install via rustup? And why is that environment variable set? Just trying to understand a bit more because it will have been added to fix another users issue so I don't want to just willy-nilly remove the env var check
Looking at my Windows environment variables, I don't have RUSTUP_TOOLCHAIN
set! I am using rustup for my Rust install. I even tried using Powershell to see if it would do the trick and no luck.
Sorry for the delay, I have pushed a branch with a potential fix, if you could try it out and let me know if it solves it - otherwise I'll look to different methods. The branch is fix/broken-toolchain-directives
Doing too many PRs at once and merged this one. It's a change I likely would have merged anyway... But yeah it's in develop now!
Okay this is released, I'll close the issue but if it still persists feel free to reopen
Ah dang, I lost track of this, sorry! I just upgraded to v0.29.0. Looks like the issue is still occuring :/
@xd009642 I don't think I'm able to reopen this issue.
Ok I decided to clone the repo and tinker with it. I just printed all my environment variables and RUSTUP_TOOLCHAIN is there clear as day. However running env
in Git bash, or Get-ChildItem env:
in Powershell does not include this variable. Very odd!
I believe I know what the issue is: I have rustup installed to a non-default directory E:\\Programs\RustUp
. tarpaulin includes the +toolchain directive if .rustup
is not in the path. Instead, we should be using the RUSTUP_HOME
environment variable if it is present.
I am on Windows 10, using Rust 1.76, default toolchain set to stable-x86_64-pc-windows-msvc. I ran
cargo new --lib code-cov-example
, cd'ed into it, and rancargo tarpaulin
and got the following message:I'm not really sure how to debug this. I also just installed tarpaulin using
cargo install cargo-tarpaulin
like normal.