Skip to content

Commit

Permalink
[shellcheck] disable "Check exit code directly" warning on line 273, 666
Browse files Browse the repository at this point in the history
We need to use both the exit state and result form the previous commit,
so SC2181 should be disabled here.
  • Loading branch information
PeterDaveHello committed Nov 23, 2016
1 parent 5508f8d commit 4b4e71f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ nvm_ensure_version_installed() {
local NVM_VERSION_DIR
if [ "${EXIT_CODE}" != "0" ] || ! nvm_is_version_installed "${LOCAL_VERSION}"; then
VERSION="$(nvm_resolve_alias "${PROVIDED_VERSION}")"
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then
nvm_err "N/A: version \"${PROVIDED_VERSION} -> ${VERSION}\" is not yet installed."
nvm_err ""
Expand Down Expand Up @@ -663,6 +664,7 @@ nvm_alias() {
nvm_ls_current() {
local NVM_LS_CURRENT_NODE_PATH
NVM_LS_CURRENT_NODE_PATH="$(command which node 2> /dev/null)"
# shellcheck disable=SC2181
if [ $? -ne 0 ]; then
nvm_echo 'none'
elif nvm_tree_contains_path "$(nvm_version_dir iojs)" "${NVM_LS_CURRENT_NODE_PATH}"; then
Expand Down

0 comments on commit 4b4e71f

Please sign in to comment.