setupCmdEnvironmentVariable adds to the given environment slice any other environment values from the context.
(ctx context.Context, environment []string)
| 910 | // setupCmdEnvironmentVariable adds to the given environment slice any other |
| 911 | // environment values from the context. |
| 912 | func 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 | |
| 921 | func setupCliVersion(ctx context.Context, vars map[string]string) (map[string]string, error) { |
| 922 | v, err := testenv.CLIVersion(ctx) |