mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-22 11:04:28 +02:00
* Restore build args after optimize. Fixes #1910, #1912. * Apply review suggestions.
This commit is contained in:
@@ -51,8 +51,11 @@ func (b *BuildArgs) Clone() *BuildArgs {
|
||||
|
||||
// ReplacementEnvs returns a list of filtered environment variables
|
||||
func (b *BuildArgs) ReplacementEnvs(envs []string) []string {
|
||||
// Ensure that we operate on a new array and do not modify the underlying array
|
||||
resultEnv := make([]string, len(envs))
|
||||
copy(resultEnv, envs)
|
||||
filtered := b.FilterAllowed(envs)
|
||||
return append(envs, filtered...)
|
||||
return append(resultEnv, filtered...)
|
||||
}
|
||||
|
||||
// AddMetaArgs adds the supplied args map to b's allowedMetaArgs
|
||||
|
||||
Reference in New Issue
Block a user