From b9d8671144f382905166d1a3a2c6ba43bad91e5e Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Tue, 10 May 2016 08:20:47 -0700 Subject: [PATCH] servo: Merge #11097 - Override always 'CARGO_HOME' env variable (from saneyuki:cargo_home); r=larsbergstrom This use always `cargo-home-dir` in `/.servobuild` even if you set `CARGO_HOME` in your shell. If you use [racer][racer] with [rustup (multirust.rs)][rustup], you may set `CARGO_HOME` env variable to your shell. Then the previous code would be a problem which does not use `cargo-home-dir` in `/.servobuild`. [racer]: https://github.com/phildawes/racer [rustup]: https://github.com/rust-lang-nursery/rustup.rs Source-Repo: https://github.com/servo/servo Source-Revision: 0617727f5b58d1c4ebb10cf081f5952b7961fbf4 --- servo/python/servo/command_base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/servo/python/servo/command_base.py b/servo/python/servo/command_base.py index 1623c8fc41f7..0b51bf93dc65 100644 --- a/servo/python/servo/command_base.py +++ b/servo/python/servo/command_base.py @@ -293,8 +293,7 @@ class CommandBase(object): if extra_path: env["PATH"] = "%s%s%s" % (os.pathsep.join(extra_path), os.pathsep, env["PATH"]) - if "CARGO_HOME" not in env: - env["CARGO_HOME"] = self.config["tools"]["cargo-home-dir"] + env["CARGO_HOME"] = self.config["tools"]["cargo-home-dir"] if "CARGO_TARGET_DIR" not in env: env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target")