File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,11 @@ runHook() {
8181 local -r executing_hook=$1 ; shift
8282 local rc=0
8383
84- local -r pipeline=$( _getPipeline " ${executing_hook} .d" )
85- debug " Pipeline is ${pipeline} "
86- while IFS= read -rd ' ' script; do
84+ local -r _tmpfile=$( mktemp captain-hook.XXXX)
85+ _getPipeline " ${executing_hook} .d" > " ${_tmpfile} "
86+ debug " PWD is $PWD "
87+ debug " Pipeline is $( cat " ${_tmpfile} " ) "
88+ while IFS= read -r script; do
8789 # if part of the pipeline has failed, skip forward to the
8890 # "ensured" scripts
8991 if [[ " ${rc} " -ne 0 ]]; then
@@ -94,7 +96,8 @@ runHook() {
9496 " ${script} " " $@ "
9597 rc=$( _updateRc " ${rc} " $? )
9698 debug " Executing script: '${script} '...done"
97- done < <( " ${pipeline} " )
99+ done < " ${_tmpfile} "
100+ rm -f " ${_tmpfile} "
98101
99102 exit " $( _determineExitCode " ${rc} " ) "
100103}
You can’t perform that action at this time.
0 commit comments