MCPcopy Create free account
hub / github.com/conforma/cli / setupCmdEnvironmentVariable

Function setupCmdEnvironmentVariable

acceptance/cli/cli.go:912–919  ·  view source on GitHub ↗

setupCmdEnvironmentVariable adds to the given environment slice any other environment values from the context.

(ctx context.Context, environment []string)

Source from the content-addressed store, hash-verified

910// setupCmdEnvironmentVariable adds to the given environment slice any other
911// environment values from the context.
912func setupCmdEnvironmentVariable(ctx context.Context, environment []string) ([]string, error) {
913 newEnvironment, ok := ctx.Value(cmdEnvVar).([]string)
914 if !ok && environment != nil {
915 return environment, nil
916 }
917 environment = append(environment, newEnvironment...)
918 return environment, nil
919}
920
921func setupCliVersion(ctx context.Context, vars map[string]string) (map[string]string, error) {
922 v, err := testenv.CLIVersion(ctx)

Callers 1

variablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected