Merge pull request #8314 from kasper3/patch-1
Check if tput command exists before using it
This commit is contained in:
commit
ecdaa669eb
2 changed files with 1 additions and 3 deletions
|
@ -6,8 +6,6 @@
|
|||
# Dockerfile that creates a container suitable to build dotnet-cli
|
||||
FROM microsoft/dotnet-buildtools-prereqs:alpine-3.6-3148f11-20171119021156
|
||||
|
||||
RUN apk add --no-cache sudo ncurses
|
||||
|
||||
# This Dockerfile doesn't use the USER_ID, but the parameter needs to be declared to prevent docker
|
||||
# from issuing a warning
|
||||
ARG USER_ID=0
|
||||
|
|
2
scripts/obtain/dotnet-install.sh
vendored
2
scripts/obtain/dotnet-install.sh
vendored
|
@ -22,7 +22,7 @@ exec 3>&1
|
|||
|
||||
# Setup some colors to use. These need to work in fairly limited shells, like the Ubuntu Docker container where there are only 8 colors.
|
||||
# See if stdout is a terminal
|
||||
if [ -t 1 ]; then
|
||||
if [ -t 1 ] && command -v tput > /dev/null; then
|
||||
# see if it supports colors
|
||||
ncolors=$(tput colors)
|
||||
if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then
|
||||
|
|
Loading…
Reference in a new issue