Don’t restrict colors to TTYs.

This restriction prevents subcommands from producing colors and passing them up the tree to the actual TTY.
This commit is contained in:
Jordan Harband
2016-05-08 17:10:02 -07:00
parent 0880539972
commit eeaddf9ab0
3 changed files with 7 additions and 5 deletions

4
nvm.sh
View File

@@ -34,9 +34,7 @@ nvm_is_alias() {
nvm_has_colors() {
local NVM_COLORS
if test -t 1; then
NVM_COLORS="$(tput -T "${TERM:-vt100}" colors)"
fi
NVM_COLORS="$(tput -T "${TERM:-vt100}" colors)"
[ "${NVM_COLORS:--1}" -ge 8 ]
}