diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89319318b..b94b35111 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: - uses: Swatinem/rust-cache@v1 - name: Install RISC-V toolkit - run: cargo xtask install-toolkit - + run: cargo xtask install-toolkit --force + - name: Build hosted-ci run: cargo xtask ${{ matrix.task }} diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 9196c5b3e..9eee9a152 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -1122,8 +1122,9 @@ fn ensure_compiler( // Since no sysroot exists, we must download a new one. let toolchain_path = get_sysroot(None)?.ok_or_else(|| "default toolchain not installed".to_owned())?; - // If the terminal is a tty, offer to download the latest toolchain. - if !atty::is(atty::Stream::Stdin) { + // If the terminal is a tty, or if toolchain installation is forced, + // download the latest toolchain. + if !atty::is(atty::Stream::Stdin) && !force_install { return Err(format!("Toolchain for {} not found", target)); }