Using `setup-rust-toolchain` multiple times in the same job issues a warning on macOS
Closed this issue · 2 comments
If I include multiple uses of actions-rust-lang/setup-rust-toolchain
in the same workflow job (to install two different Rust versions), when run on macOS, a warning about bash
already being installed is issued:
bash 5.2.26 is already installed and up-to-date. To reinstall 5.2.26, run: brew reinstall bash
Sample run: https://github.com/clechasseur/msrv-prep/actions/runs/10154329214
The action is not meant to be executed multiple times in a single job, since modifying the environment, setting up the cache and error highlighters are global changes. As such there might be more stuff that doesn't quite work right if you do that. I added the possibility to install multiple Rust toolchains at once with b31b131. This hopefully eliminates the need to execute the action multiple times.
As for brew specifically, I do not use Mac, so I am not familiar with brew, but I couldn't find any command line options that would avoid the warning. However, if you have an idea PRs are welcome.
Actually, I didn't know you could now install multiple versions with one invocation. That completely solves my problem. Thank you!