Windows build cannot override Rust toolchain using RUSTUP_TOOLCHAIN
environmental variable
#19
Labels
M: builds
Build, test, and deployment maintenance.
Milestone
In GitLab by @azriel91 on Mar 11, 2018, 21:00
TL;DR: Environmental variables do not appear to be visible to commands run from the Windows shell. The shell itself can see them though.
Rustup allows you to set the
RUSTUP_TOOLCHAIN
environmental variable to override the Rust toolchain commands.On Windows, it works when I run it on a windows cmd shell:
However, when run through Gitlab CI, it does not. The environmental variable is set, but
rustc
andcargo
still show that thestable
toolchain is used (the default on that box):$ echo RUSTUP_TOOLCHAIN: %RUSTUP_TOOLCHAIN% RUSTUP_TOOLCHAIN: nightly-x86_64-pc-windows-msvc $ cargo --version -v cargo 0.25.0 (96d8071da 2018-02-26) release: 0.25.0 commit-hash: 96d8071da2800d871677d090c31b030d5b9682bc commit-date: 2018-02-26 $ rustc --version -v rustc 1.24.1 (d3ae9a9e0 2018-02-27) binary: rustc commit-hash: d3ae9a9e08edf12de0ed82af57ba2a56c26496ea commit-date: 2018-02-27 host: x86_64-pc-windows-msvc release: 1.24.1 LLVM version: 4.0
It works on Linux through Gitlab CI (this Runner also has a
stable
default toolchain):More evidence can be seen in this build, which shows that Rustup installs the nightly toolchain in one command through the Runner's configuration, but in the next commands, it uses
cargo
andrustc
from thestable
toolchains:From these symptoms, it appears that Rustup does not see the environmental variables set by Gitlab CI, even though the shell can see them as variables.
The text was updated successfully, but these errors were encountered: