actions-rs / toolchain

🛠️ GitHub Action for `rustup` commands
https://github.com/marketplace/actions/rust-toolchain
MIT License
585 stars 86 forks source link

Miscreant warning re rust-fmt already installed, on every run #213

Open max-sixty opened 2 years ago

max-sixty commented 2 years ago

Do the checklist before filing an issue:

Description

Currently we get a warning on every run:

Warning: warning: tool `cargo-fmt` is already installed, remove it from `/home/runner/.cargo/bin`, then run `rustup update` to have rustup manage this tool.

Is this expected? It's not a calamity, but it's helpful to be able to use the presence of warnings to identify an actual issue, rather than have them on every run.

Workflow code

https://github.com/prql/prql/blob/7c53bae1df859e8a258f7605c5dba003889fc0dd/.github/workflows/test.yaml#L34-L39

Action output

Run actions-rs/toolchain@v1
  with:
    profile: minimal
    target: wasm32-unknown-unknown
    toolchain: stable
    default: false
    override: false
  env:
    CACHE_ON_FAILURE: false
    CARGO_INCREMENTAL: 0
/home/runner/.cargo/bin/rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/runner/.rustup

stable-x86_64-unknown-linux-gnu (overridden by '/home/runner/work/prql/prql/rust-toolchain.toml')
rustc 1.60.0 (7737e0b5c 2022-04-04)
/home/runner/.cargo/bin/rustup -V
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.60.0 (7737e0b5c 2022-04-04)`
Installed rustup 1.24.3 support profiles
/home/runner/.cargo/bin/rustup set profile minimal
info: profile set to 'minimal'
/home/runner/.cargo/bin/rustup toolchain install stable
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.60.0 (7737e0b5c 2022-04-04)

info: checking for self-updates
warning: tool `rustfmt` is already installed, remove it from `/home/runner/.cargo/bin`, then run `rustup update` to have rustup manage this tool.
Warning: warning: tool `cargo-fmt` is already installed, remove it from `/home/runner/.cargo/bin`, then run `rustup update` to have rustup manage this tool.
/home/runner/.cargo/bin/rustup target add --toolchain stable wasm32-unknown-unknown
info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
info: installing component 'rust-std' for 'wasm32-unknown-unknown'
Gathering installed versions
  /home/runner/.cargo/bin/rustc -V
  rustc 1.60.0 (7737e0b5c 2022-04-04)
  /home/runner/.cargo/bin/cargo -V
  cargo 1.60.0 (d1fd9fe 2022-03-01)
  /home/runner/.cargo/bin/rustup -V
  rustup 1.24.3 (ce5817a94 2021-05-31)
  info: This is the version for the rustup toolchain manager, not the rustc compiler.
  info: The currently active `rustc` version is `rustc 1.60.0 (7737e0b5c 2022-04-04)`

Expected behavior

No warning