Create alias dir on demand
parent
590b283e65
commit
45b89ab396
3
nvm.sh
3
nvm.sh
|
@ -154,8 +154,9 @@ nvm()
|
||||||
echo "# use 'nvm sync' to update from nodejs.org"
|
echo "# use 'nvm sync' to update from nodejs.org"
|
||||||
;;
|
;;
|
||||||
"alias" )
|
"alias" )
|
||||||
|
mkdir -p $NVM_DIR/alias
|
||||||
if [ $# -le 2 ]; then
|
if [ $# -le 2 ]; then
|
||||||
(cd $NVM_DIR/alias; for ALIAS in `ls $2* 2>/dev/null`; do
|
(cd $NVM_DIR/alias && for ALIAS in `ls $2* 2>/dev/null`; do
|
||||||
DEST=`cat $ALIAS`
|
DEST=`cat $ALIAS`
|
||||||
VERSION=`nvm_version $DEST`
|
VERSION=`nvm_version $DEST`
|
||||||
if [ "$DEST" = "$VERSION" ]; then
|
if [ "$DEST" = "$VERSION" ]; then
|
||||||
|
|
Loading…
Reference in New Issue