Skip to content

Commit ed34a1a

Browse files
committed
Restore +x on ELF executables after artifact download
Add a CI step to restore execute permissions on ELF binaries in artifacts/bin, ensuring xUnit v3 can launch the apphost after artifact download. This addresses issues caused by upload/download-artifact not preserving Unix mode bits, preventing "Permission denied" errors during test runs.
1 parent 52167eb commit ed34a1a

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,20 @@ jobs:
5959
name: test-release-artifacts
6060
path: artifacts
6161

62+
# upload-artifact / download-artifact do not preserve Unix mode bits; xUnit v3 execs the
63+
# apphost (path without .dll). Without +x, launch fails with Permission denied (Win32Exception 13).
64+
- name: Restore execute bit on ELF outputs under artifacts/bin
65+
run: |
66+
set -euo pipefail
67+
command -v file >/dev/null || { echo "file command not found"; exit 1; }
68+
if [ -d artifacts/bin ]; then
69+
while IFS= read -r -d '' f; do
70+
if file -b "$f" | grep -qiE 'ELF.*executable'; then
71+
chmod +x "$f"
72+
fi
73+
done < <(find artifacts/bin -type f -print0)
74+
fi
75+
6276
- name: Apply serialized xUnit runner for Explicit
6377
run: |
6478
set -euo pipefail

0 commit comments

Comments
 (0)