From 598d88bdcbd21eba408887a3c3784786c1bbdaa4 Mon Sep 17 00:00:00 2001 From: cremesk Date: Mon, 29 Jul 2019 21:43:00 +0200 Subject: [PATCH] try fix --- envs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/envs b/envs index ab302f2..3fbffe0 100755 --- a/envs +++ b/envs @@ -99,9 +99,9 @@ _EOF_ verify_script_name() { [[ $1 == "" ]] && error_exit "please start over and enter the script name" - [[ $(type -P "$1") ]] && - [[ -x $HOME/bin/$1 ]] || + if [[ $(type "$1" > /dev/null 2>&1) ]]; then error_exit "$1 already exists. rename your script and try again." + fi [[ -x /envs/bin/$1 ]] && error_exit "$1 is already taken. rename your script and try again." case $1 in about|description|list|ls|submit|about|help|apropos|submit|approve)