New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cargo-make not respecting toolchain
#1068
Comments
@wmmc88 rustfmt tasks are a mess! [tasks.install-rustfmt]
description = "Installs cargo rustfmt plugin."
category = "Development"
env.CFG_RELEASE = { value = "${CARGO_MAKE_RUST_VERSION}", condition = { env_not_set = [
"CFG_RELEASE",
] } }
env.CFG_RELEASE_CHANNEL = { value = "${CARGO_MAKE_RUST_CHANNEL}", condition = { env_not_set = [
"CFG_RELEASE_CHANNEL",
] } }
install_crate = { crate_name = "rustfmt-nightly", rustup_component_name = "rustfmt", binary = "rustfmt", test_arg = "--help" } which is not amazing either. |
Describe The Bug
I'll preface this by saying that this issue is not blocking me in any way right now, but I noticed it while debugging some other issues I had so I'm reporting it now.
There's actually two issues I see here:
install-rustfmt
task does not take into account what toolchain is being used. Ifrust-fmt
is only installed forstable
, and you are running withnightly
,install-rustfmt
will not try to install the component for the nightly toolchain.nightly
rustfmt
is not installed, I would expect that when cargo make executes something requiring it, it should fail. Instead,cargo-make
defaults to using the stable version instead. I am unsure why whencargo-make
executesExecute Command: "rustup" "run" "nightly" "cargo" "fmt"
, it has different behaviour that invoking the command (rustup run nightly cargo fmt
) directly.To Reproduce
The above snipping shows both problems.
install-rustup
did not install the nightly version ofrustfmt
, andcargo-make
is for some reason behaving different from manually running the command (ie. its using stable rustfmt instead of erroring).The text was updated successfully, but these errors were encountered: