diff options
author | Josh Matthews <josh@joshmatthews.net> | 2016-07-07 12:06:54 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2016-10-06 07:45:43 -0400 |
commit | a2bc9d77758d8c851636e7721b788f22dc4df80d (patch) | |
tree | 689adb33b69fd9e38a54d27419d8992d1892f1b9 /python/servo/devenv_commands.py | |
parent | 906b7b33efc788d169a4d746b8a2a90c136d9b73 (diff) | |
download | servo-a2bc9d77758d8c851636e7721b788f22dc4df80d.tar.gz servo-a2bc9d77758d8c851636e7721b788f22dc4df80d.zip |
Avoid #12321 by creating environment before switching directories.
Diffstat (limited to 'python/servo/devenv_commands.py')
-rw-r--r-- | python/servo/devenv_commands.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index c99012a9a41..b7a40858165 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -174,23 +174,24 @@ class MachCommands(CommandBase): description='upgrade wptrunner.', category='devenv') def upgrade_wpt_runner(self): + env = self.build_env() with cd(path.join(self.context.topdir, 'tests', 'wpt', 'harness')): - code = call(["git", "init"], env=self.build_env()) + code = call(["git", "init"], env=env) if code: return code # No need to report an error if this fails, as it will for the first use - call(["git", "remote", "rm", "upstream"], env=self.build_env()) + call(["git", "remote", "rm", "upstream"], env=env) code = call( - ["git", "remote", "add", "upstream", "https://github.com/w3c/wptrunner.git"], env=self.build_env()) + ["git", "remote", "add", "upstream", "https://github.com/w3c/wptrunner.git"], env=env) if code: return code - code = call(["git", "fetch", "upstream"], env=self.build_env()) + code = call(["git", "fetch", "upstream"], env=env) if code: return code - code = call(["git", "reset", "--hard", "remotes/upstream/master"], env=self.build_env()) + code = call(["git", "reset", "--hard", "remotes/upstream/master"], env=env) if code: return code - code = call(["rm", "-rf", ".git"], env=self.build_env()) + code = call(["rm", "-rf", ".git"], env=env) if code: return code return 0 |