Skip to content

Commit

Permalink
fix(pipeline): nil pointer when no defined pipeline (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrynhard authored Apr 6, 2018
1 parent 7fd1e89 commit 1933d19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ type Pipeline struct {
// Build executes a docker build.
// nolint: gocyclo
func (p *Pipeline) Build(metadata *metadata.Metadata, stages map[string]*stage.Stage, tasks map[string]*task.Task) (err error) {
if p == nil {
return
}
for i, stageName := range p.Stages {
if _, ok := stages[stageName]; !ok {
return fmt.Errorf("Stage %q is not defined in conform.yaml", stageName)
Expand Down

0 comments on commit 1933d19

Please sign in to comment.