Fix new hooks

This commit is contained in:
Dennis Eichhorn 2018-08-11 11:59:36 +02:00
parent f56dd74de6
commit 58e229e911

View File

@ -71,7 +71,13 @@ isValidBashScript() {
}
hasInvalidBasicSyntax() {
# Check whitespace end of line in code
echo "$(grep -P ' $' )"
echo $(grep -P ' $' "$1")
if [[ -n $(grep -P ' $' "$1") ]]; then
return 1
fi
# Check for tabs
if [[ -n $(grep -P '\t' "$1") ]]; then