From c10984e6d3484fd3c0957316f99a4cdc7432fe66 Mon Sep 17 00:00:00 2001 From: Damanpreet Singh Date: Mon, 28 Oct 2024 17:00:48 +0530 Subject: [PATCH] Don't set APP_CACHE_DIR if --no-cache is passed with apps dev build --- internal/apps/builder/cnb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/apps/builder/cnb.go b/internal/apps/builder/cnb.go index 383c4cc5c..27c3785e0 100644 --- a/internal/apps/builder/cnb.go +++ b/internal/apps/builder/cnb.go @@ -92,7 +92,7 @@ func (b *CNBComponentBuilder) Build(ctx context.Context) (res ComponentBuilderRe }) } - if b.localCacheDir != "" { + if b.localCacheDir != "" && !b.baseComponentBuilder.noCache { mounts = append(mounts, mount.Mount{ Type: mount.TypeBind, Source: b.localCacheDir, @@ -348,7 +348,7 @@ func (b *CNBComponentBuilder) cnbEnv(ctx context.Context) ([]string, error) { envs = append(envs, "PREVIOUS_APP_IMAGE_URL="+b.AppImageOutputName()) } - if b.localCacheDir != "" { + if b.localCacheDir != "" && !b.baseComponentBuilder.noCache { envs = append(envs, "APP_CACHE_DIR="+cnbCacheDir) }