Skip to content

Commit

Permalink
feat(NA): add trap for SIGINT in the git precommit hook (#52662) (#52701
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mistic authored Dec 11, 2019
1 parent c65a4d0 commit 666817e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/dev/register_git_hook/register_git_hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ function getKbnPrecommitGitHookScript(rootPath, nodeHome, platform) {
set -euo pipefail
# Make it possible to terminate pre commit hook
# using ctrl-c so nothing else would happen or be
# sent to the output.
#
# The correct exit code on that situation
# according the linux documentation project is 130
# https://www.tldp.org/LDP/abs/html/exitcodes.html
trap "exit 130" SIGINT
has_node() {
command -v node >/dev/null 2>&1
}
Expand Down

0 comments on commit 666817e

Please sign in to comment.