Support secrets in cli exec (#5374)

This commit is contained in:
qwerty287
2025-07-31 07:13:07 +03:00
committed by GitHub
parent eced1ee886
commit 12cd608150
3 changed files with 11 additions and 8 deletions

View File

@@ -15,6 +15,7 @@
package compiler
import (
"maps"
"net/url"
"path"
"strings"
@@ -74,9 +75,7 @@ func WithMetadata(metadata metadata.Metadata) Option {
return func(compiler *Compiler) {
compiler.metadata = metadata
for k, v := range metadata.Environ() {
compiler.env[k] = v
}
maps.Copy(compiler.env, metadata.Environ())
}
}
@@ -143,9 +142,7 @@ func WithLocal(local bool) Option {
// added by default to every container in the pipeline.
func WithEnviron(env map[string]string) Option {
return func(compiler *Compiler) {
for k, v := range env {
compiler.env[k] = v
}
maps.Copy(compiler.env, env)
}
}