From ec7b8e5c31779a7acdb30719b1f4c13fcfa4ba99 Mon Sep 17 00:00:00 2001 From: Sophie Wigmore Date: Wed, 21 Dec 2022 14:58:59 -0500 Subject: [PATCH] always set composer package layer to cache=true --- build.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.go b/build.go index cf6d656b..5ef6fc04 100644 --- a/build.go +++ b/build.go @@ -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, @@ -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,