diff --git a/ci/scripts/cpp_build.sh b/ci/scripts/cpp_build.sh index 2e6f35936ab..37484cc8384 100755 --- a/ci/scripts/cpp_build.sh +++ b/ci/scripts/cpp_build.sh @@ -25,6 +25,10 @@ build_dir=${2}/cpp : ${ARROW_USE_CCACHE:=OFF} : ${BUILD_DOCS_CPP:=OFF} +if [ -x "$(command -v git)" ]; then + git config --global --add safe.directory ${1} +fi + # TODO(kszucs): consider to move these to CMake if [ ! -z "${CONDA_PREFIX}" ]; then echo -e "===\n=== Conda environment for build\n===" diff --git a/ci/scripts/python_build.sh b/ci/scripts/python_build.sh index 1f8b19b6816..e87117ce877 100755 --- a/ci/scripts/python_build.sh +++ b/ci/scripts/python_build.sh @@ -27,6 +27,10 @@ python_build_dir=${build_dir}/python : ${BUILD_DOCS_PYTHON:=OFF} +if [ -x "$(command -v git)" ]; then + git config --global --add safe.directory ${arrow_dir} +fi + case "$(uname)" in Linux) n_jobs=$(nproc) diff --git a/docker-compose.yml b/docker-compose.yml index f3c67fc4af7..4eaf54855df 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1581,7 +1581,10 @@ services: environment: <<: *ccache volumes: *ubuntu-volumes - command: archery lint --all --no-clang-tidy --no-iwyu --no-numpydoc + command: > + /bin/bash -c " + git config --global --add safe.directory /arrow && + archery lint --all --no-clang-tidy --no-iwyu --no-numpydoc" ######################### Integration Tests ################################# @@ -1733,6 +1736,7 @@ services: command: > /bin/bash -c " apt update -y && apt install -y curl git gnupg tzdata wget && + git config --global --add safe.directory /arrow && /arrow/dev/release/verify-release-candidate.sh $${VERIFY_VERSION} $${VERIFY_RC}" almalinux-verify-rc: