Skip to content

Commit 6a91566

Browse files
committed
fix: Add support for using defer and force options in combination with other runner
1 parent aa87ec0 commit 6a91566

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ func validateRunnerKey(k string) error {
767767
if k == includeRunnerKey || k == testRunnerKey || k == dumpRunnerKey || k == execRunnerKey || k == bindRunnerKey || k == runnerRunnerKey {
768768
return fmt.Errorf("runner name %q is reserved for built-in runner", k)
769769
}
770-
if k == ifSectionKey || k == descSectionKey || k == loopSectionKey {
770+
if k == ifSectionKey || k == descSectionKey || k == loopSectionKey || k == deferSectionKey || k == forceSectionKey {
771771
return fmt.Errorf("runner name %q is reserved for built-in section", k)
772772
}
773773
return nil
@@ -781,7 +781,7 @@ func validateStepKeys(s map[string]any) error {
781781
mainRunner := 0
782782
subRunner := 0
783783
for k := range s {
784-
if k == ifSectionKey || k == descSectionKey || k == loopSectionKey {
784+
if k == ifSectionKey || k == descSectionKey || k == loopSectionKey || k == deferSectionKey || k == forceSectionKey {
785785
continue
786786
}
787787
if k == testRunnerKey || k == dumpRunnerKey || k == bindRunnerKey {

0 commit comments

Comments
 (0)