Skip to content

Commit

Permalink
always set composer package layer to cache=true
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie Wigmore committed Dec 21, 2022
1 parent be2890b commit ec7b8e5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ func runComposerInstall(
logger.Process("Reusing cached layer %s", composerPackagesLayer.Path)
logger.Break()

composerPackagesLayer.Launch, composerPackagesLayer.Build, composerPackagesLayer.Cache = launch, build, launch
composerPackagesLayer.Launch, composerPackagesLayer.Build = launch, build
// the layer is always set to cache = true because we need it during subsequent builds to copy vendor into /workspace
composerPackagesLayer.Cache = true

logger.Debug.Subprocess("Setting cached layer types: launch=[%t], build=[%t], cache=[%t]",
composerPackagesLayer.Launch,
Expand Down Expand Up @@ -293,7 +295,9 @@ func runComposerInstall(
return packit.Layer{}, err
}

composerPackagesLayer.Launch, composerPackagesLayer.Build, composerPackagesLayer.Cache = launch, build, launch
composerPackagesLayer.Launch, composerPackagesLayer.Build = launch, build
// the layer is always set to cache = true because we need it during subsequent builds to copy vendor into /workspace
composerPackagesLayer.Cache = true

logger.Debug.Subprocess("Setting layer types: launch=[%t], build=[%t], cache=[%t]",
composerPackagesLayer.Launch,
Expand Down

0 comments on commit ec7b8e5

Please sign in to comment.