Merge pull request #205 from deiga/add-current-command
Added command to get current nvm environment.master
commit
d7015c7f65
3
nvm.sh
3
nvm.sh
|
@ -441,6 +441,9 @@ nvm() {
|
|||
print_versions "`nvm_ls_remote $2`"
|
||||
return
|
||||
;;
|
||||
"current" )
|
||||
echo -ne "current: \t"; nvm_version current
|
||||
;;
|
||||
"alias" )
|
||||
mkdir -p $NVM_DIR/alias
|
||||
if [ $# -le 2 ]; then
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
. ../../nvm.sh
|
||||
[[ $(nvm current) == *"current"* ]] || die "Failed to find current version"
|
Loading…
Reference in New Issue