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:
DL6ER 2017-10-28 15:44:17 +02:00
parent 7362416afb
commit 0db76aada0
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

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