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:
parent
3e73c82956
commit
f10e9fa484
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user