mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
Merge pull request #119 from gsora/gsora/fix-ci-download
fix: on non-TTY terminals, if forced, proceed with toolchain download and install
This commit is contained in:
commit
18f7a4519c
2 changed files with 5 additions and 4 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue