Bats 1.10.0: Hitting error "tput: No value for $TERM and no -T specified" in Concourse CI #819
Labels
Component: Bash Code
Everything regarding the bash code
Component: CLI
Command line flags, exit code handling, ...
Priority: Medium
Wrong or misleading documentation, broken behavior with workaround
Status: Confirmed
The reproducer worked as described
Type: Bug
Describe the bug
Running our tests based on Bats in Concourse CI with a Ubuntu 20.04 docker image causes the following error:
tput: No value for $TERM and no -T specified
.The Concourse CI environment is using
TERM=dumb
.To Reproduce
Steps to reproduce the behavior:
TERM="" bats file.bats
See the only output:
Return code: 2 (ENOENT)
Expected behavior
Bats is not failing if
tput
fails andTERM
is not set or is set todumb
.Bats is running in a safe mode without colors and any other fancy terminal features.
Environment (please complete the following information):
ubuntu:20.04
bash --version
: GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)curl -L -O -J https://github.com/bats-core/bats-core/archive/v1.10.0.tar.gz
Additional context
The Concourse CI environment is using
TERM=dumb
.Also running
TERM="" bats -x --verbose-run file.bats
causes the same single line output.Using workaround
[[ -z "$TERM" || "$TERM" == "dumb" ]] && export TERM="xterm-256color"
for now.The text was updated successfully, but these errors were encountered: