0
0
mirror of https://github.com/tj/n.git synced 2024-11-25 07:39:21 +01:00

remove version fix

This commit is contained in:
jerome@work 2013-07-09 17:27:17 +02:00
parent 7f8447281a
commit 00d82dbfcc

7
bin/n
View File

@ -298,11 +298,10 @@ install_node() {
# Remove <version ...>
#
remove_version() {
remove_versions() {
test -z $1 && abort "version(s) required"
local version=${1#v}
while test $# -ne 0; do
rm -rf $VERSIONS_DIR/$version
rm -rf $VERSIONS_DIR/${1#v}
shift
done
}
@ -405,7 +404,7 @@ else
--stable) display_latest_stable_version $2; exit ;;
bin|which) display_bin_path_for_version $2; exit ;;
as|use) shift; execute_with_version $@; exit ;;
rm|-) remove_version $2; exit ;;
rm|-) shift; remove_versions $@; exit ;;
latest) install_node `n --latest`; exit ;;
stable) install_node `n --stable`; exit ;;
ls|list) display_remote_versions $2; exit ;;