Skip to content

Commit a152f57

Browse files
committed
CI: Fix find command logic for shell script executable permission check
- Corrected the find command grouping in the permissions workflow to avoid false positives. - Now, only .sh files (including run.sh) missing user-execute permission are reported. - Prevents unnecessary errors when all scripts are already executable. Signed-off-by: Srikanth Muppandam <[email protected]>
1 parent 29b80d4 commit a152f57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/check-executable-permissions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Detect missing executable permissions on shell scripts
1717
run: |
1818
# Find all .sh and run.sh scripts without +x
19-
BAD=$(find . -type f -name 'run.sh' -o -name '*.sh' ! -perm -u=x)
19+
BAD=$(find . -type f \( -name "*.sh" -o -name "run.sh" \) ! -perm -u=x)
2020
if [ -n "$BAD" ]; then
2121
echo "::error file=run.sh,line=1::❌ Some shell scripts are missing executable permissions. This can break CI and LAVA. Please fix before merging."
2222
echo "::error file=run.sh,line=2::To fix, run: find . -name '*.sh' -o -name 'run.sh' | xargs chmod +x && git add . && git commit -m 'Fix: restore executable bits on scripts' && git push"

0 commit comments

Comments
 (0)