diff --git a/core/scripts/dev/commit-code-check.sh b/core/scripts/dev/commit-code-check.sh index 59d72b0411186fa71bd9d4d75afea5f9ea726a98..a22a7808afb9fbe1749ad11c6af1a8e25c27dfe3 100755 --- a/core/scripts/dev/commit-code-check.sh +++ b/core/scripts/dev/commit-code-check.sh @@ -366,13 +366,8 @@ # Ensure the file still exists (i.e. is not being deleted). if [ -a $FILE ]; then if [ ${FILE: -3} != ".sh" ]; then - # Ensure the file has the correct mode. - STAT="$(stat -f "%A" $FILE 2>/dev/null)" - if [ $? -ne 0 ]; then - STAT="$(stat -c "%a" $FILE 2>/dev/null)" - fi - if [ "$STAT" -ne "644" ]; then - printf "${red}check failed:${reset} file $FILE should be 644 not $STAT\n" + if [ -x $FILE ]; then + printf "${red}check failed:${reset} file $FILE should not be executable\n" STATUS=1 fi fi