Skip to content

Add TERM environment variable to CI workflow#25

Merged
GochoMugo merged 2 commits intomasterfrom
copilot/fix-term-variable-in-tests
Dec 6, 2025
Merged

Add TERM environment variable to CI workflow#25
GochoMugo merged 2 commits intomasterfrom
copilot/fix-term-variable-in-tests

Conversation

Copy link
Contributor

Copilot AI commented Dec 6, 2025

The tests workflow fails with tput: No value for $TERM and no -T specified when lib/format.sh executes terminal formatting commands in the GitHub Actions environment.

Changes

  • Set TERM: xterm environment variable in the 'Run tests' step
- name: Run tests
  env:
    TERM: xterm
  run: make test

This provides the terminal type that tput requires to initialize formatting variables (txt_bold, txt_underline, etc.) used throughout the codebase.

Original prompt

Problem

The tests workflow is failing with the following error:

tput: No value for $TERM and no -T specified

This error occurs when terminal utility commands like tput are run in a non-interactive environment (like GitHub Actions) without the TERM environment variable being set.

Solution

Add the TERM environment variable to the 'Run tests' step in .github/workflows/test.yml.

Modify the 'Run tests' step to include:

- name: Run tests
  env:
    TERM: xterm
  run: make test

This will ensure that terminal utilities have a valid TERM value to work with during the test execution.

File to modify

  • .github/workflows/test.yml - Add env: TERM: xterm to the 'Run tests' step (currently on line 60-61)

This pull request was created as a result of the following prompt from Copilot chat.

Problem

The tests workflow is failing with the following error:

tput: No value for $TERM and no -T specified

This error occurs when terminal utility commands like tput are run in a non-interactive environment (like GitHub Actions) without the TERM environment variable being set.

Solution

Add the TERM environment variable to the 'Run tests' step in .github/workflows/test.yml.

Modify the 'Run tests' step to include:

- name: Run tests
  env:
    TERM: xterm
  run: make test

This will ensure that terminal utilities have a valid TERM value to work with during the test execution.

File to modify

  • .github/workflows/test.yml - Add env: TERM: xterm to the 'Run tests' step (currently on line 60-61)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: GochoMugo <4707579+GochoMugo@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing TERM variable in tests workflow Add TERM environment variable to CI workflow Dec 6, 2025
Copilot AI requested a review from GochoMugo December 6, 2025 16:36
@GochoMugo GochoMugo marked this pull request as ready for review December 6, 2025 16:45
@GochoMugo GochoMugo merged commit cfcd148 into master Dec 6, 2025
0 of 8 checks passed
@GochoMugo GochoMugo deleted the copilot/fix-term-variable-in-tests branch December 6, 2025 16:45
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.

2 participants