Check if command is nil before optimizing

MAINTAINER returns nil since it's deprecated, so we should make sure we
don't add to the list of commands to optimize.
This commit is contained in:
Priya Wadhwa 2018-11-13 10:12:03 -08:00
parent e7d1123073
commit 5df363a0f6
1 changed files with 3 additions and 0 deletions

View File

@ -155,6 +155,9 @@ func (s *stageBuilder) build() error {
if err != nil {
return err
}
if command == nil {
continue
}
cmds = append(cmds, command)
}