propagateEnvVars propagates the values of environment variables to the test environment.
(env *testscript.Env, vars ...string)
| 78 | // propagateEnvVars propagates the values of environment variables to the test |
| 79 | // environment. |
| 80 | func propagateEnvVars(env *testscript.Env, vars ...string) { |
| 81 | for _, key := range vars { |
| 82 | if v, ok := os.LookupEnv(key); ok { |
| 83 | env.Setenv(key, v) |
| 84 | } |
| 85 | } |
| 86 | } |