Merge pull request #3812 from josteink/terminal-probe
Handle missing terminal capabilities.
This commit is contained in:
commit
44bf7b499e
1 changed files with 10 additions and 10 deletions
20
scripts/obtain/dotnet-install.sh
vendored
20
scripts/obtain/dotnet-install.sh
vendored
|
@ -27,16 +27,16 @@ if [ -t 1 ]; then
|
||||||
# see if it supports colors
|
# see if it supports colors
|
||||||
ncolors=$(tput colors)
|
ncolors=$(tput colors)
|
||||||
if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then
|
if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then
|
||||||
bold="$(tput bold)"
|
bold="$(tput bold || echo)"
|
||||||
normal="$(tput sgr0)"
|
normal="$(tput sgr0 || echo)"
|
||||||
black="$(tput setaf 0)"
|
black="$(tput setaf 0 || echo)"
|
||||||
red="$(tput setaf 1)"
|
red="$(tput setaf 1 || echo)"
|
||||||
green="$(tput setaf 2)"
|
green="$(tput setaf 2 || echo)"
|
||||||
yellow="$(tput setaf 3)"
|
yellow="$(tput setaf 3 || echo)"
|
||||||
blue="$(tput setaf 4)"
|
blue="$(tput setaf 4 || echo)"
|
||||||
magenta="$(tput setaf 5)"
|
magenta="$(tput setaf 5 || echo)"
|
||||||
cyan="$(tput setaf 6)"
|
cyan="$(tput setaf 6 || echo)"
|
||||||
white="$(tput setaf 7)"
|
white="$(tput setaf 7 || echo)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue