mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
Support empty env var when it can't be unset
Signed-off-by: David Gageot <david.gageot@docker.com>
This commit is contained in:
@ -15,8 +15,8 @@ import (
|
||||
const DockerfileLabel = "com.docker.image.source.entrypoint"
|
||||
|
||||
func addGitProvenance(ctx context.Context, contextPath string, dockerfilePath string) (map[string]string, error) {
|
||||
v, ok := os.LookupEnv("BUILDX_GIT_LABELS")
|
||||
if !ok || contextPath == "" {
|
||||
v := os.Getenv("BUILDX_GIT_LABELS")
|
||||
if (v != "1" && v != "full") || contextPath == "" {
|
||||
return nil, nil
|
||||
}
|
||||
labels := make(map[string]string, 0)
|
||||
|
Reference in New Issue
Block a user