Skip to content

Commit 7343476

Browse files
committed
fix: keep previous returncode when using @then
1 parent f950946 commit 7343476

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bash_unit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ gherkin_WHEN() {
542542
}
543543

544544
gherkin_THEN() {
545+
local rc=$?
545546
local COL=""
546547
local NCOL=""
547548
if is_terminal; then
@@ -556,6 +557,7 @@ gherkin_THEN() {
556557
gherkin_last_msg="${gherkin_last_msg} ${COL}WHEN${NCOL} $gherkin_last_when\n"
557558
gherkin_last_msg="${gherkin_last_msg} ${COL}THEN${NCOL} $gherkin_last_then"
558559
echo ""
560+
return $rc
559561
}
560562

561563
gherkin_AND() { gherkin_THEN "$@"; }

0 commit comments

Comments
 (0)