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 <sn03.general@gmail.com>
This commit is contained in:
Subhaditya Nath 2021-08-15 17:56:22 +05:30
parent e8079620f5
commit 298324e6e6
2 changed files with 2 additions and 2 deletions

View file

@ -179,6 +179,7 @@ versionOutput() {
output="Latest ${1^} hash is $latHash"
else
errorOutput
return 1
fi
[[ -n "$output" ]] && echo " $output"

3
pihole
View file

@ -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