From 298324e6e696b3dc3e7ae508cce2c74bc681682d Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Sun, 15 Aug 2021 17:56:22 +0530 Subject: [PATCH] Don't ignore exit code of version.sh If it exits with a non-zero return code, that means some error occurred, and so it shouldn't be ignored. Signed-off-by: Subhaditya Nath --- advanced/Scripts/version.sh | 1 + pihole | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/version.sh b/advanced/Scripts/version.sh index 978dd3fe..ff14d83a 100755 --- a/advanced/Scripts/version.sh +++ b/advanced/Scripts/version.sh @@ -179,6 +179,7 @@ versionOutput() { output="Latest ${1^} hash is $latHash" else errorOutput + return 1 fi [[ -n "$output" ]] && echo " $output" diff --git a/pihole b/pihole index e8fa9317..96a4a9f6 100755 --- a/pihole +++ b/pihole @@ -95,8 +95,7 @@ uninstallFunc() { versionFunc() { shift - "${PI_HOLE_SCRIPT_DIR}"/version.sh "$@" - exit 0 + exec "${PI_HOLE_SCRIPT_DIR}"/version.sh "$@" } # Get PID of main pihole-FTL process