Skip to content

Commit dd249c5

Browse files
committed
Fix GH action to run in macOS
1 parent 8197ef2 commit dd249c5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ jobs:
1919
- name: Build tests
2020
run: cargo test --no-run
2121
- name: Find test executable
22-
run: echo "TEST_EXECUTABLE=$(find ./target/debug/deps/ -type f -perm /111 -name 'as_root-*')" >> $GITHUB_ENV
22+
run: |
23+
if [[ "$(uname)" == "Darwin" ]]; then
24+
echo "TEST_EXECUTABLE=$(find ./target/debug/deps/ -type f -perm +111 -name 'as_root-*')" >> $GITHUB_ENV
25+
else
26+
echo "TEST_EXECUTABLE=$(find ./target/debug/deps/ -type f -executable -name 'as_root-*')" >> $GITHUB_ENV
27+
fi
2328
- name: Run root-required test user_and_group_does_not_exist
2429
run: sudo -E -- "$TEST_EXECUTABLE --show-output --ignored --test user_and_group_does_not_exist"
2530
env:

0 commit comments

Comments
 (0)