Skip to content

Commit 629dab0

Browse files
chore: fixed colour terminal check
1 parent 84046d3 commit 629dab0

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎build_cmake.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Targets=()
2323
# ##########################################################
2424
# colours
2525

26-
if command -v tput > /dev/null; then
26+
if [ -n "${TERM:-}" ] && [ -t 1 ] && command -v tput >/dev/null 2>&1; then
2727

2828
SisClr_Blue=${FG_BLUE:-$(tput setaf 4)}
2929
SisClr_Red=${FG_RED:-$(tput setaf 1)}

‎clean_cmake.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ProjectName=$(tr -d '[:space:]' < "$ProjectNameFile")
2020
# ##########################################################
2121
# colours
2222

23-
if command -v tput > /dev/null; then
23+
if [ -n "${TERM:-}" ] && [ -t 1 ] && command -v tput >/dev/null 2>&1; then
2424

2525
SisClr_Blue=${FG_BLUE:-$(tput setaf 4)}
2626
SisClr_Red=${FG_RED:-$(tput setaf 1)}

‎prepare_cmake.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ VerboseMakefile=0
2929
# ##########################################################
3030
# colours
3131

32-
if command -v tput > /dev/null; then
32+
if [ -n "${TERM:-}" ] && [ -t 1 ] && command -v tput >/dev/null 2>&1; then
3333

3434
SisClr_Blue=${FG_BLUE:-$(tput setaf 4)}
3535
SisClr_Red=${FG_RED:-$(tput setaf 1)}

‎remove_cmake_artefacts.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Files=(
3030
# ##########################################################
3131
# colours
3232

33-
if command -v tput > /dev/null; then
33+
if [ -n "${TERM:-}" ] && [ -t 1 ] && command -v tput >/dev/null 2>&1; then
3434

3535
SisClr_Blue=${FG_BLUE:-$(tput setaf 4)}
3636
SisClr_Red=${FG_RED:-$(tput setaf 1)}

0 commit comments

Comments
 (0)