mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fix: on non-TTY terminals if forced, proceed with toolchain download and install
This is a corner case in Github CI.
This commit is contained in:
parent
ccafeb21a3
commit
ae2762e7f5
2 changed files with 5 additions and 6 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
|
@ -1,9 +1,7 @@
|
||||||
#on:
|
|
||||||
# push:
|
|
||||||
# branches:
|
|
||||||
# - main
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
name: Build xous-core
|
name: Build xous-core
|
||||||
|
|
||||||
|
|
@ -13,7 +11,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
task: ["hosted-ci"] #, "renode-image"]
|
task: ["hosted-ci", "renode-image"]
|
||||||
steps:
|
steps:
|
||||||
- name: Install Ubuntu dependencies
|
- name: Install Ubuntu dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -1122,7 +1122,8 @@ fn ensure_compiler(
|
||||||
// Since no sysroot exists, we must download a new one.
|
// Since no sysroot exists, we must download a new one.
|
||||||
let toolchain_path =
|
let toolchain_path =
|
||||||
get_sysroot(None)?.ok_or_else(|| "default toolchain not installed".to_owned())?;
|
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 the terminal is a tty, or if toolchain installation is forced,
|
||||||
|
// download the latest toolchain.
|
||||||
if !atty::is(atty::Stream::Stdin) && !force_install {
|
if !atty::is(atty::Stream::Stdin) && !force_install {
|
||||||
return Err(format!("Toolchain for {} not found", target));
|
return Err(format!("Toolchain for {} not found", target));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue