[shellcheck] Use -n/-z instead of ! -z/! -n condition

https://github.com/koalaman/shellcheck/wiki/SC2236
This commit is contained in:
Peter Dave Hello authored and Jordan Harband committed 2018-12-03 13:59:19 +08:00
1 parent 153506c8da
commit 14179bc8ce
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -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