mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Suppress error if gitconfig file does not exists (#3998)
* Suppress error if gitconfig file does not exists. * Use grep * Supress error
This commit is contained in:
@@ -30,7 +30,7 @@ fi
|
||||
if [[ -f "${SRC}"/lib/general.sh ]]; then
|
||||
|
||||
# Declare this folder as safe
|
||||
if [[ -z $(cat ${HOME}/.gitconfig | grep "directory = \*") ]]; then
|
||||
if ! grep -q 2>/dev/null "directory = \*" "$HOME/.gitconfig"; then
|
||||
git config --global --add safe.directory "*"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user