[Fix] nvm_has_colors: avoid an aliased tput

Fixes #3413
This commit is contained in:
Jordan Harband 2024-08-20 09:23:45 -07:00
parent 81f18bc445
commit d5e2c92a25
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56

2
nvm.sh
View File

@ -81,7 +81,7 @@ nvm_command_info() {
nvm_has_colors() {
local NVM_NUM_COLORS
if nvm_has tput; then
NVM_NUM_COLORS="$(tput -T "${TERM:-vt100}" colors)"
NVM_NUM_COLORS="$(command tput -T "${TERM:-vt100}" colors)"
fi
[ "${NVM_NUM_COLORS:--1}" -ge 8 ] && [ "${NVM_NO_COLORS-}" != '--no-colors' ]
}