ensure nil step does not cause problems

This commit is contained in:
Brad Rydzewski
2019-10-17 15:52:05 -07:00
parent b198003a0c
commit 983f1badde
6 changed files with 26 additions and 1 deletions

View File

@@ -77,6 +77,9 @@ func checkPipeline(pipeline *resource.Pipeline, trusted bool) error {
func checkSteps(pipeline *resource.Pipeline, trusted bool) error {
steps := append(pipeline.Services, pipeline.Steps...)
for _, step := range steps {
if step == nil {
return errors.New("linter: nil step")
}
if err := checkStep(step, trusted); err != nil {
return err
}