mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-12-17 10:44:20 +08:00
[shellcheck] Use -n/-z instead of ! -z/! -n condition
https://github.com/koalaman/shellcheck/wiki/SC2236
This commit is contained in:
committed by
Jordan Harband
parent
153506c8da
commit
14179bc8ce
2
nvm.sh
2
nvm.sh
@@ -323,7 +323,7 @@ nvm_rc_version() {
|
||||
return 1
|
||||
fi
|
||||
NVM_RC_VERSION="$(command head -n 1 "${NVMRC_PATH}" | command tr -d '\r')" || command printf ''
|
||||
if [ ! -n "${NVM_RC_VERSION}" ]; then
|
||||
if [ -z "${NVM_RC_VERSION}" ]; then
|
||||
nvm_err "Warning: empty .nvmrc file found at \"${NVMRC_PATH}\""
|
||||
return 2
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user