Skip to content

Commit 4b4e71f

Browse files
[shellcheck] disable "Check exit code directly" warning on line 273, 666
We need to use both the exit state and result form the previous commit, so SC2181 should be disabled here.
1 parent 5508f8d commit 4b4e71f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nvm.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ nvm_ensure_version_installed() {
269269
local NVM_VERSION_DIR
270270
if [ "${EXIT_CODE}" != "0" ] || ! nvm_is_version_installed "${LOCAL_VERSION}"; then
271271
VERSION="$(nvm_resolve_alias "${PROVIDED_VERSION}")"
272+
# shellcheck disable=SC2181
272273
if [ $? -eq 0 ]; then
273274
nvm_err "N/A: version \"${PROVIDED_VERSION} -> ${VERSION}\" is not yet installed."
274275
nvm_err ""
@@ -663,6 +664,7 @@ nvm_alias() {
663664
nvm_ls_current() {
664665
local NVM_LS_CURRENT_NODE_PATH
665666
NVM_LS_CURRENT_NODE_PATH="$(command which node 2> /dev/null)"
667+
# shellcheck disable=SC2181
666668
if [ $? -ne 0 ]; then
667669
nvm_echo 'none'
668670
elif nvm_tree_contains_path "$(nvm_version_dir iojs)" "${NVM_LS_CURRENT_NODE_PATH}"; then

0 commit comments

Comments
 (0)