Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gmenih committed Oct 20, 2023
1 parent e986a2f commit ee231a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ func lowerStep(step Step, context *Context, stepContext *StepContext) (Step, err
step["name"] = strings.TrimSpace(fmt.Sprintf(":%s: %s", stepContext.EmojiName, name))

// Block and wait steps must not contains agents or env, so we return early here
_, hasBlockStep := step["block"]
_, hasWaitStep := step["wait"]
if hasBlockStep || hasWaitStep {
_, isBlockStep := step["block"]
_, isWaitStep := step["wait"]
if isBlockStep || isWaitStep {
return step, nil
}

Expand Down
4 changes: 2 additions & 2 deletions pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ if: 1 == 1
t.Error("lowerStep returned err:", err)
}
if !reflect.DeepEqual(step["env"], nil) {
t.Errorf("env should not be set for a wait step")
t.Errorf("env should not be set for a block step")
}
if !reflect.DeepEqual(step["agents"], nil) {
t.Errorf("agents should not be set for a wait step")
t.Errorf("agents should not be set for a block step")
}
}

Expand Down

0 comments on commit ee231a6

Please sign in to comment.