all: use utils.Setenv where appropriate #7261

Merged
merged 1 commit into from Apr 21, 2017

Conversation

Projects
None yet
5 participants
Owner

rogpeppe commented Apr 20, 2017

Also remove the environment append where it
was actually a no-op and remove the unused setenv
function in environs/tools.

This makes the juju/juju/cmd tests pass under
Go tip.

QA no regressions

LGTM

Owner

rogpeppe commented Apr 20, 2017

!!build!!

Owner

rogpeppe commented Apr 20, 2017

!!build!!

Owner

rogpeppe commented Apr 20, 2017

$$merge$$

Contributor

jujubot commented Apr 20, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Apr 20, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10701

@@ -64,7 +62,6 @@ func TestRunMain(t *stdtesting.T) {
func badrun(c *gc.C, exit int, args ...string) string {
localArgs := append([]string{"-test.run", "TestRunMain", "-run-main", "--", "juju"}, args...)
ps := exec.Command(os.Args[0], localArgs...)
- ps.Env = append(os.Environ(), osenv.JujuXDGDataHomeEnvKey+"="+osenv.JujuXDGDataHome())
@jameinel

jameinel Apr 20, 2017

Owner

Shouldn't we still be doing this with Setenv?

@rogpeppe

rogpeppe Apr 21, 2017

Owner

No - the environment variable is already set, so appending the value
had no effect previously, but the new Go changes (and the new Setenv
primitive) assumes that it does.

all: use utils.Setenv where appropriate
Also remove the environment append where it
was actually a no-op and remove the unused setenv
function in environs/tools.
Owner

rogpeppe commented Apr 21, 2017

$$merge$$

Contributor

jujubot commented Apr 21, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 2e958b9 into juju:develop Apr 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment