From 469fdaa50dfbd6fa8932fd320c4e3dafe85e8716 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Fri, 13 Sep 2019 11:49:30 -0700 Subject: [PATCH] test --- pkg/executor/build.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/executor/build.go b/pkg/executor/build.go index e0e397131..e134e52b5 100644 --- a/pkg/executor/build.go +++ b/pkg/executor/build.go @@ -123,6 +123,7 @@ func initializeConfig(img partial.WithConfigFile) (*v1.ConfigFile, error) { if err != nil { return nil, err } + if imageConfig.Config.Env == nil { imageConfig.Config.Env = constants.ScratchEnvVars } @@ -177,7 +178,7 @@ func (s *stageBuilder) optimize(compositeKey CompositeCache, cfg v1.Config) erro } } - // Mutate the cfg for any commands that require it. + // Mutate the config for any commands that require it. if command.MetadataOnly() { if err := command.ExecuteCommand(&cfg, s.args); err != nil { return err @@ -269,7 +270,7 @@ func (s *stageBuilder) build() error { if err != nil { return err } - // Push layer to cache (in parallel) now along with new cfg file + // Push layer to cache (in parallel) now along with new config file if s.opts.Cache && command.ShouldCacheOutput() { cacheGroup.Go(func() error { return pushLayerToCache(s.opts, ck, tarPath, command.String()) @@ -335,7 +336,7 @@ func (s *stageBuilder) saveSnapshotToImage(createdBy string, tarPath string) err return err } if fi.Size() <= emptyTarSize { - logrus.Info("No files were changed, appending empty layer to cfg. No layer added to image.") + logrus.Info("No files were changed, appending empty layer to config. No layer added to image.") return nil }