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

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-05-22 15:36:51 -07:00
parent 74eb8c8622
commit 5004cf331a
No known key found for this signature in database
GPG key ID: 572E999E385B7BFC

View file

@ -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
}