mirror of
https://github.com/containers/podman.git
synced 2025-12-12 17:57:31 +08:00
Vendor in containers/buildah v1.19.3
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
9
vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
generated
vendored
9
vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
generated
vendored
@@ -834,7 +834,11 @@ func (s *StageExecutor) Execute(ctx context.Context, base string) (imgID string,
|
||||
// Check if there's already an image based on our parent that
|
||||
// has the same change that we're about to make, so far as we
|
||||
// can tell.
|
||||
if checkForLayers {
|
||||
// Only do this if there were no build args given by the user,
|
||||
// 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 {
|
||||
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")
|
||||
@@ -1022,6 +1026,9 @@ func (s *StageExecutor) getCreatedBy(node *parser.Node, addedContentSummary stri
|
||||
return "/bin/sh"
|
||||
}
|
||||
switch strings.ToUpper(node.Value) {
|
||||
case "ARG":
|
||||
buildArgs := s.getBuildArgs()
|
||||
return "/bin/sh -c #(nop) ARG " + buildArgs
|
||||
case "RUN":
|
||||
buildArgs := s.getBuildArgs()
|
||||
if buildArgs != "" {
|
||||
|
||||
Reference in New Issue
Block a user