diff options
author | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2016-05-10 02:04:12 +0900 |
---|---|---|
committer | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2016-05-10 02:18:28 +0900 |
commit | cb90f22c3ee5072b3089a71b0651ebb9c6b8b8a8 (patch) | |
tree | 86ab97f0a6a300f31340246d89fb0493becd605a /python/servo/command_base.py | |
parent | 58a9b31de274d952a390f672fdc541c7d502ad59 (diff) | |
download | servo-cb90f22c3ee5072b3089a71b0651ebb9c6b8b8a8.tar.gz servo-cb90f22c3ee5072b3089a71b0651ebb9c6b8b8a8.zip |
Override always 'CARGO_HOME' env variable.
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.
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
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r-- | python/servo/command_base.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 1623c8fc41f..0b51bf93dc6 100644 --- a/python/servo/command_base.py +++ b/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") |