mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-17 11:03:44 +00:00
Compare commits
3 Commits
224b85717b
...
0803bbc94e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0803bbc94e | ||
![]() |
ff1257e8e3 | ||
![]() |
cae2eb71a2 |
@ -163,7 +163,8 @@ install_nvm_from_git() {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
# Cloning repo
|
# Cloning repo
|
||||||
command git clone "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || {
|
command git clone "$(nvm_source)" --depth=1 -o origin "${INSTALL_DIR}" 2> /dev/null \
|
||||||
|
|| command git clone "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || {
|
||||||
nvm_echo >&2 'Failed to clone nvm repo. Please report this!'
|
nvm_echo >&2 'Failed to clone nvm repo. Please report this!'
|
||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
|
6
nvm.sh
6
nvm.sh
@ -83,7 +83,7 @@ nvm_has_colors() {
|
|||||||
if nvm_has tput; then
|
if nvm_has tput; then
|
||||||
NVM_NUM_COLORS="$(tput -T "${TERM:-vt100}" colors)"
|
NVM_NUM_COLORS="$(tput -T "${TERM:-vt100}" colors)"
|
||||||
fi
|
fi
|
||||||
[ "${NVM_NUM_COLORS:--1}" -ge 8 ]
|
[ "${NVM_NUM_COLORS:--1}" -ge 8 ] && [ "${NVM_NO_COLORS-}" != '--no-colors' ]
|
||||||
}
|
}
|
||||||
|
|
||||||
nvm_curl_libz_support() {
|
nvm_curl_libz_support() {
|
||||||
@ -1094,7 +1094,7 @@ nvm_print_formatted_alias() {
|
|||||||
fi
|
fi
|
||||||
local ARROW
|
local ARROW
|
||||||
ARROW='->'
|
ARROW='->'
|
||||||
if [ -z "${NVM_NO_COLORS}" ] && nvm_has_colors; then
|
if nvm_has_colors; then
|
||||||
ARROW='\033[0;90m->\033[0m'
|
ARROW='\033[0;90m->\033[0m'
|
||||||
if [ "_${DEFAULT}" = '_true' ]; then
|
if [ "_${DEFAULT}" = '_true' ]; then
|
||||||
NEWLINE=" \033[${DEFAULT_COLOR}(default)\033[0m\n"
|
NEWLINE=" \033[${DEFAULT_COLOR}(default)\033[0m\n"
|
||||||
@ -1832,7 +1832,7 @@ nvm_print_versions() {
|
|||||||
DEFAULT_COLOR=$(nvm_get_colors 5)
|
DEFAULT_COLOR=$(nvm_get_colors 5)
|
||||||
LTS_COLOR=$(nvm_get_colors 6)
|
LTS_COLOR=$(nvm_get_colors 6)
|
||||||
|
|
||||||
if [ -z "${NVM_NO_COLORS-}" ] && nvm_has_colors; then
|
if nvm_has_colors; then
|
||||||
NVM_HAS_COLORS=1
|
NVM_HAS_COLORS=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user