1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

Exit script immediately if we can't update package cache.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-03-02 15:54:58 -08:00
parent 044afa838c
commit 24fd23493d
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC

View File

@ -741,7 +741,8 @@ update_package_cache() {
if eval ${UPDATE_PKG_CACHE} &> /dev/null; then
echo " done!"
else
echo -n "\n!!! ERROR - Unable to update package cache. Please try \"${UPDATE_PKG_CACHE}\""
echo -en "\n!!! ERROR - Unable to update package cache. Please try \"${UPDATE_PKG_CACHE}\""
return 1
fi
}
@ -1209,7 +1210,7 @@ main() {
fi
# Update package cache
update_package_cache
update_package_cache || exit 1
# Notify user of package availability
notify_package_updates_available