No need to `cd $PWD` as it doesn't affect flow of caller script.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
pull/1491/head
Dan Schaper 7 years ago
parent 74eb8c8622
commit 5004cf331a
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC

@ -222,14 +222,11 @@ getGitFiles() {
resetRepo() {
local directory="${1}"
local curdir
curdir="${PWD}"
cd "${directory}" &> /dev/null || return 1
echo -n "::: Resetting repo in ${1}..."
git reset --hard &> /dev/null || return $?
echo " done!"
cd "${curdir}" &> /dev/null || return 1
return 0
}

Loading…
Cancel
Save