Skip to content

Commit decd9b7

Browse files
ci: conditionally disable spotlight indexing on nightly gauntlet (#19142)
Same as #19124
1 parent 719c9cc commit decd9b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/nightly-gauntlet.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ jobs:
3737
- name: Disable Spotlight Indexing
3838
if: runner.os == 'macOS'
3939
run: |
40+
enabled=$(sudo mdutil -a -s | grep "Indexing enabled" | wc -l)
41+
if [ $enabled -eq 0 ]; then
42+
echo "Spotlight indexing is already disabled"
43+
exit 0
44+
fi
4045
sudo mdutil -a -i off
4146
sudo mdutil -X /
4247
sudo launchctl bootout system /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

0 commit comments

Comments
 (0)