MCPcopy Create free account
hub / github.com/devspace-sh/devspace / matchEnvironment

Function matchEnvironment

pkg/devspace/config/versions/versions.go:303–316  ·  view source on GitHub ↗
(env map[string]string)

Source from the content-addressed store, hash-verified

301}
302
303func matchEnvironment(env map[string]string) (bool, error) {
304 for k, v := range env {
305 match, err := regexp.MatchString(sanitizeMatchExpression(v), os.Getenv(k))
306 if err != nil {
307 return false, err
308 }
309
310 if !match {
311 return false, nil
312 }
313 }
314
315 return true, nil
316}
317
318func matchVars(ctx context.Context, activationVars map[string]string, resolver variable.Resolver) (bool, error) {
319 for k, v := range activationVars {

Callers 1

getActivatedProfilesFunction · 0.85

Calls 1

sanitizeMatchExpressionFunction · 0.85

Tested by

no test coverage detected