Skip to content

Commit ff4e593

Browse files
authored
Update build.sh to work with out TERM
1 parent bcc39eb commit ff4e593

File tree

1 file changed

+11
-4
lines changed
  • swift-ci/sdks/static-linux/scripts

1 file changed

+11
-4
lines changed

swift-ci/sdks/static-linux/scripts/build.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,17 @@ if [ -t 1 ]; then
2424
fi
2525
fi
2626

27-
bold=$(tput bold)
28-
white=$(tput setaf 15)
29-
grey=$(tput setaf 8)
30-
reset=$(tput sgr0)
27+
if [[ -n "$TERM" ]]; then
28+
bold=""
29+
white=""
30+
grey=""
31+
reset=""
32+
else
33+
bold=$(tput bold)
34+
white=$(tput setaf 15)
35+
grey=$(tput setaf 8)
36+
reset=$(tput sgr0)
37+
fi
3138

3239
function cleanup {
3340
echo "${reset}"

0 commit comments

Comments
 (0)