mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-02-05 17:32:47 +08:00
[Fix] nvm_has_colors: also check if stdout is a terminal
This commit is contained in:
@@ -11,6 +11,8 @@ die () {
|
||||
|
||||
set -e
|
||||
|
||||
nvm_has_colors() { return 0; }
|
||||
|
||||
nvm_get_colors(){
|
||||
echo "0;95m"
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ if [ -n ${NVM_COLORS} ]; then
|
||||
unset NVM_COLORS
|
||||
fi
|
||||
|
||||
nvm_has_colors() { return 0; }
|
||||
|
||||
# default system color
|
||||
nvm use system
|
||||
OUTPUT=$(nvm_print_versions system)
|
||||
|
||||
Reference in New Issue
Block a user