Skip to content

Commit

Permalink
Don't set APP_CACHE_DIR if --no-cache is passed with apps dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
fumblehool committed Oct 28, 2024
1 parent b63f7dd commit c10984e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/apps/builder/cnb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit c10984e

Please sign in to comment.