mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge pull request #1287 from pi-hole/fix/update_fail
Exit script immediately if we can't update package cache.
This commit is contained in:
commit
8776b822db
1 changed files with 3 additions and 2 deletions
|
@ -752,7 +752,8 @@ update_package_cache() {
|
||||||
if eval "${UPDATE_PKG_CACHE}" &> /dev/null; then
|
if eval "${UPDATE_PKG_CACHE}" &> /dev/null; then
|
||||||
echo " done!"
|
echo " done!"
|
||||||
else
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1310,7 +1311,7 @@ main() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update package cache
|
# Update package cache
|
||||||
update_package_cache
|
update_package_cache || exit 1
|
||||||
|
|
||||||
# Notify user of package availability
|
# Notify user of package availability
|
||||||
notify_package_updates_available
|
notify_package_updates_available
|
||||||
|
|
Loading…
Reference in a new issue