mirror of
https://github.com/tj/n.git
synced 2024-11-22 02:57:32 +01:00
return when active
This commit is contained in:
parent
7dccb39ea3
commit
0161070687
4
bin/n
4
bin/n
@ -105,12 +105,16 @@ display_versions() {
|
||||
|
||||
install_node() {
|
||||
local version=$1
|
||||
check_current_version
|
||||
|
||||
# remove "v"
|
||||
if test "${version:0:1}" = "v"; then
|
||||
version=${version:1:${#version}}
|
||||
fi
|
||||
|
||||
# already active
|
||||
test "$version" = "$installed" && return
|
||||
|
||||
# install
|
||||
local dir="node-v$version"
|
||||
cd $PREFIX/n \
|
||||
|
Loading…
Reference in New Issue
Block a user