From 0f9469cc3a317a82c177ab42a20442ffcbe85d4e Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Thu, 28 Jul 2022 14:02:57 -0600 Subject: [PATCH] self update fix --- functions/self_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/self_update.sh b/functions/self_update.sh index 690d2516..5b404492 100644 --- a/functions/self_update.sh +++ b/functions/self_update.sh @@ -9,16 +9,16 @@ if git diff --name-only origin/beta | grep -qs ".sh" ; then echo "Found a new version of HeavyScript, updating myself..." git reset --hard -q git pull --force -q - echo -e "Running the new version...\n" count=0 for i in "${args[@]}" do [[ "$i" == "--self-update" ]] && unset "args[$count]" && break ((count++)) done + [[ -z ${args[*]} ]] && exit + echo -e "Running the new version...\n" sleep 5 exec bash "$script_name" "${args[@]}" - # Now exit this old instance exit else