MCPcopy Create free account
hub / github.com/cloudbase/garm / GetEnvironmentVariables

Method GetEnvironmentVariables

config/external.go:53–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53func (e *External) GetEnvironmentVariables() []string {
54 envVars := []string{}
55
56 for _, configuredEnvVars := range e.EnvironmentVariables {
57 // discover environment variables
58 for _, k := range os.Environ() {
59 variable := strings.SplitN(k, "=", 2)
60 if strings.HasPrefix(variable[0], configuredEnvVars) &&
61 !strings.HasPrefix(variable[0], EnvironmentVariablePrefix) {
62 envVars = append(envVars, k)
63 }
64 }
65 }
66 return envVars
67}
68
69func (e *External) ExecutablePath() (string, error) {
70 execPath := e.ProviderExecutable

Callers 3

NewProviderFunction · 0.80
NewProviderFunction · 0.80

Calls

no outgoing calls

Tested by 1