don't error out if the command -v is in ~/bin
This commit is contained in:
Ben Harris 2022-06-03 14:50:32 -04:00
parent 61f6f2ccd2
commit fa8fa53e48
1 changed files with 3 additions and 1 deletions

4
tilde
View File

@ -110,7 +110,9 @@ verify_script_name() {
fi
if command -v "$1"; then
error_exit "$1 already exists. rename your script and try again."
if [ "$(command -v "$1")" != "/home/$user/bin/$1" ]; then
error_exit "$1 already exists. rename your script and try again."
fi
fi
if [ -x "/tilde/bin/$1" ]; then