Skip to content

Commit 094d945

Browse files
committed
Allow GIT access to mounted directory (manylinux)
1 parent 896a8ad commit 094d945

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/scripts/manylinux_build_and_test.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ export PYTHONPATH="$PWD${PYTHONPATH:+:${PYTHONPATH}}"
99
# Ensure dependency archives are read from the restored workspace cache even in isolated builds.
1010
export PYXMLSEC_LIBS_DIR="$PWD/libs"
1111

12+
# Step: Allow Git access to the mounted workspace for SCM version discovery
13+
echo "== [container] Step: Configure Git safe.directory =="
14+
if command -v git >/dev/null 2>&1; then
15+
if [ -n "${PWD:-}" ]; then
16+
git config --global --add safe.directory "$PWD"
17+
echo "GIT_SAFE_DIRECTORY=$PWD"
18+
fi
19+
fi
20+
1221
# Step: Install system build dependencies (manylinux only)
1322
echo "== [container] Step: Install system build dependencies (manylinux only) =="
1423
case "$MANYLINUX_IMAGE" in

0 commit comments

Comments
 (0)