From 7c271729efefd8aa46d72c42c723d5b8f6d9d32a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 19 Feb 2017 19:33:10 -0800 Subject: [PATCH] Enable working without tput. --- nvm.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 6b95788..96292d2 100755 --- a/nvm.sh +++ b/nvm.sh @@ -47,7 +47,9 @@ nvm_is_alias() { nvm_has_colors() { local NVM_COLORS - NVM_COLORS="$(tput -T "${TERM:-vt100}" colors)" + if nvm_has tput; then + NVM_COLORS="$(tput -T "${TERM:-vt100}" colors)" + fi [ "${NVM_COLORS:--1}" -ge 8 ] }