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:
@ -222,14 +222,11 @@ getGitFiles() {
|
|||||||
|
|
||||||
resetRepo() {
|
resetRepo() {
|
||||||
local directory="${1}"
|
local directory="${1}"
|
||||||
local curdir
|
|
||||||
|
|
||||||
curdir="${PWD}"
|
|
||||||
cd "${directory}" &> /dev/null || return 1
|
cd "${directory}" &> /dev/null || return 1
|
||||||
echo -n "::: Resetting repo in ${1}..."
|
echo -n "::: Resetting repo in ${1}..."
|
||||||
git reset --hard &> /dev/null || return $?
|
git reset --hard &> /dev/null || return $?
|
||||||
echo " done!"
|
echo " done!"
|
||||||
cd "${curdir}" &> /dev/null || return 1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user