[Fix] nvm_has_colors: also check if stdout is a terminal

This commit is contained in:
Jordan Harband committed 2026-01-27 10:31:07 -08:00
1 parent d2f93c1c8e
commit 35212c1346
17 files changed
+94 -39

No files matched your search

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