Skip to content
Snippets Groups Projects
Commit 583c0ce6 authored by Campbell, Stuart's avatar Campbell, Stuart
Browse files

Modified pre-commit hook for executable file checking.

Changed to allow a space between the hash-bang and the slash.
refs #7284
parent 14391c58
No related branches found
No related tags found
No related merge requests found
...@@ -121,7 +121,7 @@ mode_looks_exe() { ...@@ -121,7 +121,7 @@ mode_looks_exe() {
*.exe) return 0 ;; *.exe) return 0 ;;
*.com) return 0 ;; *.com) return 0 ;;
esac esac
git cat-file blob "$2" | head -1 | grep "^#\!/" > /dev/null git cat-file blob "$2" | head -1 | grep "^#\!\s*/" > /dev/null
} }
mode_not_exe () { mode_not_exe () {
echo "The file '$file' has looks executable but does not have an executable mode." echo "The file '$file' has looks executable but does not have an executable mode."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment