Skip to content

Commit

Permalink
Merge pull request #2967 from umohnani8/arg-cache
Browse files Browse the repository at this point in the history
Fix build arg check
  • Loading branch information
rhatdan authored Feb 4, 2021
2 parents e1dfdd3 + 28453dc commit 1040f10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imagebuildah/stage_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ func (s *StageExecutor) Execute(ctx context.Context, base string) (imgID string,
// we need to call ib.Run() to correctly put the args together before
// determining if a cached layer with the same build args already exists
// and that is done in the if block below.
if checkForLayers && s.builder.Args == nil {
if checkForLayers && len(s.builder.Args) == 0 {
cacheID, err = s.intermediateImageExists(ctx, node, addedContentSummary, s.stepRequiresLayer(step))
if err != nil {
return "", nil, errors.Wrap(err, "error checking if cached image exists from a previous build")
Expand Down

0 comments on commit 1040f10

Please sign in to comment.