From 00d82dbfcc4651040bbf679d553e9739ebda5af1 Mon Sep 17 00:00:00 2001 From: "jerome@work" Date: Tue, 9 Jul 2013 17:27:17 +0200 Subject: [PATCH] remove version fix --- bin/n | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/n b/bin/n index c855266..33a2a2a 100755 --- a/bin/n +++ b/bin/n @@ -298,11 +298,10 @@ install_node() { # Remove # -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 ;;