From 187a4f1a0cfdb3b9dc0cdb10f5638aa89b0ce41f Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Tue, 12 Nov 2024 15:13:31 +0300 Subject: [PATCH] guix: Avoid adding duplicate `safe.directory` option --- contrib/containers/guix/scripts/guix-start | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/containers/guix/scripts/guix-start b/contrib/containers/guix/scripts/guix-start index dea0e6c96ddaf..df8f559deb58d 100755 --- a/contrib/containers/guix/scripts/guix-start +++ b/contrib/containers/guix/scripts/guix-start @@ -25,8 +25,10 @@ if [[ ! -d "${SDK_PATH}/${XCODE_ARCHIVE}" ]]; then curl -L https://bitcoincore.org/depends-sources/sdks/${XCODE_ARCHIVE}.tar.gz | tar -xz -C "${SDK_PATH}" fi +# Avoid adding duplicate safe.directory option +git config --global --fixed-value --get safe.directory "${WORKSPACE_PATH}" || git config --global --add safe.directory "${WORKSPACE_PATH}" + cd "${WORKSPACE_PATH}" -git config --global --add safe.directory "${WORKSPACE_PATH}" git status >> /dev/null export HOSTS="${HOSTS:-x86_64-linux-gnu aarch64-linux-gnu riscv64-linux-gnu