This commit is contained in:
Sebastiaan van Stijn
2023-09-01 06:53:16 +08:00
committed by GitHub

View File

@@ -121,8 +121,8 @@ func (o *buildOptions) toControllerOptions() (*controllerapi.BuildOptions, error
}
// TODO: extract env var parsing to a method easily usable by library consumers
if v := os.Getenv("SOURCE_DATE_EPOCH"); v != "" {
if _, ok := opts.BuildArgs["SOURCE_DATE_EPOCH"]; !ok {
if v := os.Getenv("SOURCE_DATE_EPOCH"); v != "" {
opts.BuildArgs["SOURCE_DATE_EPOCH"] = v
}
}