is_repo()
returns values to caller, silence function.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
@ -26,10 +26,10 @@ is_repo() {
|
|||||||
local rc
|
local rc
|
||||||
|
|
||||||
curdir="${PWD}"
|
curdir="${PWD}"
|
||||||
cd "${directory}" || { echo "Unable to change to ${directory}, exiting."; exit 1; }
|
cd "${directory}" &> /dev/null || return 1
|
||||||
git status --short &> /dev/null
|
git status --short &> /dev/null
|
||||||
rc=$?
|
rc=$?
|
||||||
cd "${curdir}" || { echo "Unable to change to ${curdir}, exiting."; exit 1; }
|
cd "${curdir}" &> /dev/null || return 1
|
||||||
return "${rc}"
|
return "${rc}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user