Skip to content

Commit 3bb1144

Browse files
intel352claude
andcommitted
fix: apply same template-delimiter detection to step.branch
step.branch uses the same buildFieldTemplate pattern as step.conditional. Apply the same fix: detect existing {{ }} delimiters and use as-is. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent af75972 commit 3bb1144

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

module/pipeline_step_branch.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package module
33
import (
44
"context"
55
"fmt"
6+
"strings"
67

78
"github.com/GoCodeAlone/modular"
89
)
@@ -75,7 +76,12 @@ func (s *BranchStep) Name() string { return s.name }
7576
// sub-steps sequentially on the shared PipelineContext, and returns
7677
// NextStep=merge_step so the parent executor jumps to the merge point.
7778
func (s *BranchStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error) {
78-
tmplExpr := buildFieldTemplate(s.field)
79+
var tmplExpr string
80+
if strings.Contains(s.field, "{{") {
81+
tmplExpr = s.field
82+
} else {
83+
tmplExpr = buildFieldTemplate(s.field)
84+
}
7985
resolved, err := s.tmpl.Resolve(tmplExpr, pc)
8086
if err != nil {
8187
return nil, fmt.Errorf("branch step %q: failed to resolve field %q: %w", s.name, s.field, err)

0 commit comments

Comments
 (0)