mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
Silence errors when directory to be checked does not exist (system may have been installed without a web interface!)
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
7362416afb
commit
0db76aada0
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ function get_local_branch() {
|
|||
directory="${1}"
|
||||
local output
|
||||
|
||||
cd "${directory}" || return 1
|
||||
cd "${directory}" 2> /dev/null || return 1
|
||||
# Store STDERR as STDOUT variable
|
||||
output=$( { git rev-parse --abbrev-ref HEAD; } 2>&1 )
|
||||
echo "$output"
|
||||
|
@ -59,7 +59,7 @@ function get_local_version() {
|
|||
directory="${1}"
|
||||
local output
|
||||
|
||||
cd "${directory}" || return 1
|
||||
cd "${directory}" 2> /dev/null || return 1
|
||||
# Store STDERR as STDOUT variable
|
||||
output=$( { git describe --long --dirty --tags; } 2>&1 )
|
||||
echo "$output"
|
||||
|
|
Loading…
Reference in a new issue