@@ -20,7 +20,7 @@ import (
2020// build process.
2121type InstallProcess interface {
2222 ShouldRun (metadata map [string ]interface {}, workingDir string ) (should bool , checksum string , rubyVersion string , err error )
23- Execute (workingDir , layerPath string , config map [string ]string ) error
23+ Execute (workingDir , layerPath string , config map [string ]string , keepBuildFiles bool ) error
2424}
2525
2626// EntryResolver defines the interface for determining what phases of the
@@ -75,6 +75,7 @@ func Build(
7575 sbomGenerator SBOMGenerator ,
7676 logger scribe.Emitter ,
7777 clock chronos.Clock ,
78+ environment Environment ,
7879) packit.BuildFunc {
7980 return func (context packit.BuildContext ) (packit.BuildResult , error ) {
8081 logger .Title ("%s %s" , context .BuildpackInfo .Name , context .BuildpackInfo .Version )
@@ -122,7 +123,7 @@ func Build(
122123 return installProcess .Execute (context .WorkingDir , layer .Path , map [string ]string {
123124 "path" : layer .Path ,
124125 "clean" : "true" ,
125- })
126+ }, environment . KeepGemExtensionBuildFiles )
126127 })
127128 if err != nil {
128129 return packit.BuildResult {}, err
@@ -214,7 +215,7 @@ func Build(
214215 "path" : layer .Path ,
215216 "without" : "development:test" ,
216217 "clean" : "true" ,
217- })
218+ }, environment . KeepGemExtensionBuildFiles )
218219 })
219220 if err != nil {
220221 return packit.BuildResult {}, err
0 commit comments