1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 23:08:07 +00:00

Merge pull request #1184 from pi-hole/fix/updater-debugging

Stay in repo directory until we error check
This commit is contained in:
Mcat12 2017-01-29 12:02:55 -05:00 committed by GitHub
commit 3060c4d887

View File

@ -105,21 +105,21 @@ GitCheckUpdateAvail() {
# defaults to the current one. # defaults to the current one.
REMOTE="$(git rev-parse @{upstream})" REMOTE="$(git rev-parse @{upstream})"
# Change back to original directory
cd "${curdir}"
if [[ ${#LOCAL} == 0 ]]; then if [[ ${#LOCAL} == 0 ]]; then
echo "::: Error: Local revision could not be optained, ask Pi-hole support." echo "::: Error: Local revision could not be obtained, ask Pi-hole support."
echo "::: Additional debugging output:" echo "::: Additional debugging output:"
git status git status
exit exit
fi fi
if [[ ${#REMOTE} == 0 ]]; then if [[ ${#REMOTE} == 0 ]]; then
echo "::: Error: Remote revision could not be optained, ask Pi-hole support." echo "::: Error: Remote revision could not be obtained, ask Pi-hole support."
echo "::: Additional debugging output:" echo "::: Additional debugging output:"
git status git status
exit exit
fi fi
# Change back to original directory
cd "${curdir}"
if [[ "${LOCAL}" != "${REMOTE}" ]]; then if [[ "${LOCAL}" != "${REMOTE}" ]]; then
# Local branch is behind remote branch -> Update # Local branch is behind remote branch -> Update