Skip to content

Commit b529ab1

Browse files
author
Eric Crosson
committed
Avoid using the same name as a readonly variable
in outer scope
1 parent b3fcabf commit b529ab1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

captain-hook.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ _determineExitCode() {
7878
# This method is called by captain-hook. It will run the user's
7979
# defined git-hook pipeline when a client-side hook is invoked by git.
8080
runHook() {
81-
local -r hook=$1; shift
81+
local -r executing_hook=$1; shift
8282
local rc=0
8383

84-
local -r pipeline=$(_getPipeline "${hook}.d")
84+
local -r pipeline=$(_getPipeline "${executing_hook}.d")
85+
debug "Pipeline is ${pipeline}"
8586
while IFS= read -rd '' script; do
8687
# if part of the pipeline has failed, skip forward to the
8788
# "ensured" scripts

0 commit comments

Comments
 (0)