Auto-detect CI/TUI mode for non-interactive environments and improve patch application robustness

- apply-patches.sh: add signature-marker checks for build-system patches
  to handle cases where reverse-check fails but patch is already applied
- test-baremetal.sh: auto-disable TUI when stdout is not a terminal;
  pass CI=1 to make
- test-live-iso-qemu.sh: pass CI=1 via env to prevent repo cook panic
- scripts/run.sh: auto-disable TUI when stdout is not a terminal;
  pass CI=1 to qemu launch
- repo.rs: improve TUI initialization error messages (raw mode + alternate
  screen) and rustfmt cleanups
- config.rs: auto-detect TTY presence for TUI enablement; use is_terminal()
  instead of relying solely on CI env var
This commit is contained in:
2026-04-26 22:50:46 +01:00
parent 70a84cefee
commit 45e2016918
7 changed files with 171 additions and 12 deletions
+6 -1
View File
@@ -52,6 +52,11 @@ done
cd "$PROJECT_ROOT"
# Auto-disable TUI when stdout is not a terminal (prevents repo cook panic)
if [ -z "${CI:-}" ] && { [ ! -t 0 ] || [ ! -t 1 ]; }; then
export CI=1
fi
if [ "$BUILD" -eq 1 ]; then
echo "==> Ensuring .config is set for native build..."
if ! grep -q 'PODMAN_BUILD?=0' .config 2>/dev/null; then
@@ -91,4 +96,4 @@ fi
echo "==> Launching Red Bear OS in QEMU ($CONFIG_NAME, $ARCH)..."
echo ""
exec make qemu "CONFIG_NAME=$CONFIG_NAME" ARCH="$ARCH" "${QEMU_EXTRA_ARGS[@]}"
exec make qemu "CONFIG_NAME=$CONFIG_NAME" ARCH="$ARCH" CI=1 "${QEMU_EXTRA_ARGS[@]}"