mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
is_repo()
returns values to caller, silence function.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
68c17b26dc
commit
3365ef7aaa
1 changed files with 2 additions and 2 deletions
|
@ -26,10 +26,10 @@ is_repo() {
|
|||
local rc
|
||||
|
||||
curdir="${PWD}"
|
||||
cd "${directory}" || { echo "Unable to change to ${directory}, exiting."; exit 1; }
|
||||
cd "${directory}" &> /dev/null || return 1
|
||||
git status --short &> /dev/null
|
||||
rc=$?
|
||||
cd "${curdir}" || { echo "Unable to change to ${curdir}, exiting."; exit 1; }
|
||||
cd "${curdir}" &> /dev/null || return 1
|
||||
return "${rc}"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue