Fixing changes in Git for unsafe folder (#3695)

This commit is contained in:
Igor Pečovnik
2022-04-18 13:43:31 +02:00
committed by GitHub
parent 519b01a0b4
commit 07abe12936
2 changed files with 6 additions and 0 deletions

View File

@@ -29,6 +29,9 @@ fi
if [[ -f "${SRC}"/lib/general.sh ]]; then
# Declare this folder as safe
git config --global --add safe.directory "${SRC}"
# shellcheck source=lib/general.sh
source "${SRC}"/lib/general.sh

View File

@@ -484,6 +484,9 @@ fetch_from_repo()
local workdir=$dir
fi
# Declare folders we use as safe
git config --global --add safe.directory "${SRC}/cache/sources/$workdir"
mkdir -p "${SRC}/cache/sources/${workdir}" 2>/dev/null || \
exit_with_error "No path or no write permission" "${SRC}/cache/sources/${workdir}"