Skip to content

Set TERM=dumb fallback for CI/container environments#236

Merged
angerman merged 1 commit into
mainfrom
fix/term-dumb-fallback
Feb 26, 2026
Merged

Set TERM=dumb fallback for CI/container environments#236
angerman merged 1 commit into
mainfrom
fix/term-dumb-fallback

Conversation

@angerman
Copy link
Copy Markdown
Collaborator

Summary

  • Sets TERM=dumb as a fallback in the devx env script when $TERM is not already set
  • Fixes tput: No value for $TERM and no -T specified errors in CI/containers
  • GHC's Makefile unconditionally calls tput bold/tput sgr0 (lines 217-218) which fail without $TERM

Context

Observed on stable-haskell/ghc#153 where the devx shell runs in GitHub Actions without a terminal attached, causing 12 tput error lines per make invocation.

Test plan

  • Hydra builds pass
  • Verify nix develop .#ghc98-minimal-ghc -c bash -c 'echo $TERM' outputs dumb (no terminal) or the terminal's TERM value (interactive)

GHC's Makefile unconditionally calls `tput bold` and `tput sgr0`
(lines 217-218) which fail with "No value for $TERM and no -T
specified" when TERM is unset. This happens in CI runners and
containers where no terminal is attached.

Set TERM to "dumb" as a fallback after sourcing setup.sh so ncurses
tools like tput degrade gracefully instead of erroring.
@angerman angerman enabled auto-merge February 26, 2026 08:55
@angerman angerman added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit 10726b9 Feb 26, 2026
866 of 867 checks passed
@angerman angerman deleted the fix/term-dumb-fallback branch February 26, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant