Skip to content

Commit

Permalink
[7.x] return 1 when precommit_hook or local version fail (#400… (#40089)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer authored Jul 1, 2019
1 parent 30cce18 commit ee43c6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dev/register_git_hook/register_git_hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ function getKbnPrecommitGitHookScript(rootPath, nodeHome, platform) {
}
execute_precommit_hook() {
node scripts/precommit_hook
node scripts/precommit_hook || return 1
PRECOMMIT_FILE="./.git/hooks/pre-commit.local"
if [ -x "\${PRECOMMIT_FILE}" ]; then
echo "Executing local precommit hook found in \${PRECOMMIT_FILE}"
"$PRECOMMIT_FILE"
"$PRECOMMIT_FILE" || return 1
fi
}
Expand Down

0 comments on commit ee43c6e

Please sign in to comment.