mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Stay in repo directory until we error check
This commit is contained in:
parent
0375a3caa3
commit
033ba26041
1 changed files with 3 additions and 3 deletions
|
@ -105,9 +105,6 @@ GitCheckUpdateAvail() {
|
|||
# defaults to the current one.
|
||||
REMOTE="$(git rev-parse @{upstream})"
|
||||
|
||||
# Change back to original directory
|
||||
cd "${curdir}"
|
||||
|
||||
if [[ ${#LOCAL} == 0 ]]; then
|
||||
echo "::: Error: Local revision could not be optained, ask Pi-hole support."
|
||||
echo "::: Additional debugging output:"
|
||||
|
@ -120,6 +117,9 @@ GitCheckUpdateAvail() {
|
|||
git status
|
||||
exit
|
||||
fi
|
||||
|
||||
# Change back to original directory
|
||||
cd "${curdir}"
|
||||
|
||||
if [[ "${LOCAL}" != "${REMOTE}" ]]; then
|
||||
# Local branch is behind remote branch -> Update
|
||||
|
|
Loading…
Reference in a new issue