mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-18 22:23:51 +00:00
Update nvm_ensure_version_prefix
to support iojs
-prefixed version strings.
This commit is contained in:
8
nvm.sh
8
nvm.sh
@@ -211,7 +211,13 @@ nvm_normalize_version() {
|
||||
}
|
||||
|
||||
nvm_ensure_version_prefix() {
|
||||
echo "$1" | command sed -e 's/^\([0-9]\)/v\1/g'
|
||||
local NVM_VERSION
|
||||
NVM_VERSION="$(nvm_strip_iojs_prefix "$1" | command sed -e 's/^\([0-9]\)/v\1/g')"
|
||||
if nvm_is_iojs_version "$1"; then
|
||||
echo "$(nvm_add_iojs_prefix "$NVM_VERSION")"
|
||||
else
|
||||
echo "$NVM_VERSION"
|
||||
fi
|
||||
}
|
||||
|
||||
nvm_format_version() {
|
||||
|
Reference in New Issue
Block a user