mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-09-19 00:00:09 +08:00
[Fix] nvm_iojs_version_has_solaris_binary: fix comparison to detect non-iojs versions
Missing `_` prefix on the right side of the comparison meant the guard clause that rejects non-iojs versions almost never matched, allowing non-iojs versions to fall through. Bug introduced in https://github.com/nvm-sh/nvm/commit/2d692d9d7863844d9e5c499faf423b350235f72d / #854.
This commit is contained in:
@@ -2967,7 +2967,7 @@ nvm_iojs_version_has_solaris_binary() {
|
||||
IOJS_VERSION="$1"
|
||||
local STRIPPED_IOJS_VERSION
|
||||
STRIPPED_IOJS_VERSION="$(nvm_strip_iojs_prefix "${IOJS_VERSION}")"
|
||||
if [ "_${STRIPPED_IOJS_VERSION}" = "${IOJS_VERSION}" ]; then
|
||||
if [ "_${STRIPPED_IOJS_VERSION}" = "_${IOJS_VERSION}" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user