From f96e609314a666c7a0d2d679336c34ea96e67529 Mon Sep 17 00:00:00 2001 From: John Gee Date: Mon, 12 Aug 2019 21:32:51 +1200 Subject: [PATCH] Call exit to avoid processing extra parameters --- bin/n | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/n b/bin/n index f2a67d1..34be621 100755 --- a/bin/n +++ b/bin/n @@ -1162,16 +1162,16 @@ else -a|--arch) shift; set_arch "$1";; # set arch and continue bin|which) display_bin_path_for_version "$2"; exit ;; run|as|use) shift; run_with_version "$@"; exit ;; - exec) shift; exec_with_version "$@" ;; - doctor) show_diagnostics ;; + exec) shift; exec_with_version "$@"; exit ;; + doctor) show_diagnostics; exit ;; rm|-) shift; remove_versions "$@"; exit ;; prune) prune_cache; exit ;; latest) install latest; exit ;; stable) install stable; exit ;; lts) install lts; exit ;; - ls|list) display_versions_paths ;; - lsr|ls-remote|list-remote) shift; display_remote_versions "$1" ;; - uninstall) uninstall_installed ;; + ls|list) display_versions_paths; exit ;; + lsr|ls-remote|list-remote) shift; display_remote_versions "$1"; exit ;; + uninstall) uninstall_installed; exit ;; i|install) shift; install "$1"; exit ;; *) install "$1"; exit ;; esac