mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-20 09:49:11 +00:00
set config.Install.env variables in environment adding env to config to use across all stages switch to config.Scan to read config
17 lines
196 B
Go
17 lines
196 B
Go
package utils
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func SetEnv(env []string) {
|
|
|
|
for _, e := range env {
|
|
pair := strings.SplitN(e, "=", 2)
|
|
if len(pair) >= 2 {
|
|
os.Setenv(pair[0], pair[1])
|
|
}
|
|
}
|
|
}
|