From 9afe64b9dca1f0ab9242d37c6b74b1b9ffba44f6 Mon Sep 17 00:00:00 2001 From: Damanpreet Singh Date: Mon, 9 Sep 2024 01:19:41 +0530 Subject: [PATCH] Don't warn about clear-env key while parsing buildpack.toml as this is actually expected. Fixes https://github.com/buildpacks/pack/issues/2253 Signed-off-by: Damanpreet Singh --- pkg/buildpack/buildpack_test.go | 1 + pkg/dist/buildmodule.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/buildpack/buildpack_test.go b/pkg/buildpack/buildpack_test.go index acdaf2adce..5692f92de5 100644 --- a/pkg/buildpack/buildpack_test.go +++ b/pkg/buildpack/buildpack_test.go @@ -514,6 +514,7 @@ id = "bp.one" version = "1.2.3" homepage = "http://geocities.com/cool-bp" sbom-formats = ["this should not warn"] +clear-env = true [[targets]] os = "some-os" diff --git a/pkg/dist/buildmodule.go b/pkg/dist/buildmodule.go index 01bd8e7957..b0f0d5c838 100644 --- a/pkg/dist/buildmodule.go +++ b/pkg/dist/buildmodule.go @@ -21,6 +21,7 @@ type ModuleInfo struct { Homepage string `toml:"homepage,omitempty" json:"homepage,omitempty" yaml:"homepage,omitempty"` Keywords []string `toml:"keywords,omitempty" json:"keywords,omitempty" yaml:"keywords,omitempty"` Licenses []License `toml:"licenses,omitempty" json:"licenses,omitempty" yaml:"licenses,omitempty"` + ClearEnv bool `toml:"clear-env,omitempty" json:"clear-env,omitempty" yaml:"clear-env,omitempty"` } func (b ModuleInfo) FullName() string {