From 25f6604046b98cc1838297b56e06574e48d0b383 Mon Sep 17 00:00:00 2001 From: Feroze Mohideen Date: Mon, 18 Mar 2024 17:11:34 -0400 Subject: [PATCH] inject env var for deprectated builder --- cli/cmd/v2/build.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/cmd/v2/build.go b/cli/cmd/v2/build.go index 37e76bfc4d..cf7ee2c71c 100644 --- a/cli/cmd/v2/build.go +++ b/cli/cmd/v2/build.go @@ -151,6 +151,13 @@ func build(ctx context.Context, client api.Client, inp buildInput) buildOutput { Buildpacks: inp.BuildPacks, } + if buildConfig.Builder == "heroku/buildpacks:20" { + if opts.Env == nil { + opts.Env = map[string]string{} + } + opts.Env["ALLOW_EOL_SHIMMED_BUILDER"] = "1" + } + err := packAgent.Build(ctx, opts, buildConfig, "") if err != nil { output.Error = fmt.Errorf("error building image with pack: %w", err)