Skip to content

Commit

Permalink
Merge pull request #1795 from joe-kimmel-vmw/nostacksforyou
Browse files Browse the repository at this point in the history
only add the stack arg to lifecycle for older platform APIs
  • Loading branch information
natalieparellano authored Jun 15, 2023
2 parents 63d1592 + 57b70cd commit 46ba61f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions internal/build/lifecycle_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,13 @@ func (l *LifecycleExecution) Analyze(ctx context.Context, buildCache, launchCach
if l.opts.RunImage != "" {
args = append([]string{"-run-image", l.opts.RunImage}, args...)
}
args = append([]string{"-stack", l.mountPaths.stackPath()}, args...)
stackOp = WithContainerOperations(WriteStackToml(l.mountPaths.stackPath(), l.opts.Builder.Stack(), l.os))
runOp = WithContainerOperations(WriteRunToml(l.mountPaths.runPath(), l.opts.Builder.RunImages(), l.os))
if l.platformAPI.LessThan("0.12") {
args = append([]string{"-stack", l.mountPaths.stackPath()}, args...)
stackOp = WithContainerOperations(WriteStackToml(l.mountPaths.stackPath(), l.opts.Builder.Stack(), l.os))
} else {
args = append([]string{"-run", l.mountPaths.runPath()}, args...)
runOp = WithContainerOperations(WriteRunToml(l.mountPaths.runPath(), l.opts.Builder.RunImages(), l.os))
}
}

flagsOp := WithFlags(flags...)
Expand Down

0 comments on commit 46ba61f

Please sign in to comment.