mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-21 02:09:05 +00:00
set configScanDir as package scoped var (#264)
set config.Install.env variables in environment adding env to config to use across all stages switch to config.Scan to read config
This commit is contained in:
16
pkg/utils/env.go
Normal file
16
pkg/utils/env.go
Normal file
@@ -0,0 +1,16 @@
|
||||
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])
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user