MCPcopy Create free account
hub / github.com/compose-spec/compose-go / WithOsEnv

Function WithOsEnv

cli/options.go:240–248  ·  view source on GitHub ↗

WithOsEnv imports environment variables from OS

(o *ProjectOptions)

Source from the content-addressed store, hash-verified

238
239// WithOsEnv imports environment variables from OS
240func WithOsEnv(o *ProjectOptions) error {
241 for k, v := range utils.GetAsEqualsMap(os.Environ()) {
242 if _, set := o.Environment[k]; set {
243 continue
244 }
245 o.Environment[k] = v
246 }
247 return nil
248}
249
250// WithEnvFile sets an alternate env file.
251//

Callers

nothing calls this directly

Calls 1

GetAsEqualsMapFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…