Stay in repo directory until we error check
This commit is contained in:
@ -105,9 +105,6 @@ 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 optained, ask Pi-hole support."
|
||||||
echo "::: Additional debugging output:"
|
echo "::: Additional debugging output:"
|
||||||
@ -120,6 +117,9 @@ GitCheckUpdateAvail() {
|
|||||||
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
|
||||||
|
Reference in New Issue
Block a user