mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-17 11:03:44 +00:00
Compare commits
4 Commits
ff3a10f1a5
...
fedce9a932
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fedce9a932 | ||
![]() |
d5e2c92a25 | ||
![]() |
81f18bc445 | ||
![]() |
639aaf9cd5 |
@ -358,7 +358,7 @@ nvm_check_global_modules() {
|
||||
command printf %s\\n "$NPM_GLOBAL_MODULES"
|
||||
nvm_echo '=> If you wish to uninstall them at a later point (or re-install them under your'
|
||||
# shellcheck disable=SC2016
|
||||
nvm_echo '=> `nvm` Nodes), you can remove them from the system Node as follows:'
|
||||
nvm_echo '=> `nvm` node installs), you can remove them from the system Node as follows:'
|
||||
nvm_echo
|
||||
nvm_echo ' $ nvm use system'
|
||||
nvm_echo ' $ npm uninstall -g a_module'
|
||||
|
2
nvm.sh
2
nvm.sh
@ -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' ]
|
||||
}
|
||||
|
26
test/slow/nvm run/Running 'nvm run --silent' should work
Executable file
26
test/slow/nvm run/Running 'nvm run --silent' should work
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
echo "0.10.7" > .nvmrc
|
||||
|
||||
# Check nvm run without --silent
|
||||
OUTPUT="$(nvm run --version | awk '{print $6}' | head -1)"
|
||||
EXPECTED_OUTPUT="<0.10.7>"
|
||||
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] \
|
||||
|| die "\`nvm run\` failed to run; did not match with the .nvmrc version; got >${OUTPUT}<"
|
||||
|
||||
OUTPUT="$(nvm run --silent --version)"
|
||||
EXPECTED_OUTPUT=""
|
||||
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] \
|
||||
|| die "\`nvm run --silent\` failed to run silently; expected no output, got >${OUTPUT}<"
|
||||
|
||||
# Output shouldn't be silent if --silent flag is not at the third argument position
|
||||
OUTPUT="$(nvm run --version --silent)"
|
||||
EXPECTED_OUTPUT=""
|
||||
[ "${OUTPUT}" != "${EXPECTED_OUTPUT}" ] \
|
||||
|| die "\`nvm run --version --silent\` should not be silent; expected >${OUTPUT}<, got no output"
|
Loading…
x
Reference in New Issue
Block a user