mirror of https://github.com/databricks/cli.git
This commit is contained in:
parent
ba55f5bb9c
commit
39477d5650
|
@ -177,13 +177,8 @@ func getTests(t *testing.T) []string {
|
||||||
return testDirs
|
return testDirs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In case of duplicate keys in env, the last is applicable when spawning a process.
|
||||||
func setEnv(env []string, key, value string) []string {
|
func setEnv(env []string, key, value string) []string {
|
||||||
for i, pair := range env {
|
|
||||||
if strings.HasPrefix(pair, key+"=") {
|
|
||||||
env[i] = key + "=" + value
|
|
||||||
return env
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return append(env, key+"="+value)
|
return append(env, key+"="+value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue