ensure nil step does not cause problems
This commit is contained in:
@@ -39,6 +39,9 @@ func lint(pipeline *Pipeline) error {
|
||||
// ensure pipeline steps are not unique.
|
||||
names := map[string]struct{}{}
|
||||
for _, step := range pipeline.Steps {
|
||||
if step == nil {
|
||||
return errors.New("Linter: detected nil step")
|
||||
}
|
||||
if step.Name == "" {
|
||||
return errors.New("Linter: invalid or missing step name")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user