Skip to content

Commit

Permalink
Correctly install 'nigthtly' (without a date) if it’s not installed a…
Browse files Browse the repository at this point in the history
…lready.

Should fix errors like:

https://community-tc.services.mozilla.com/tasks/WWNv1op4QUau10ixVuJfFQ/runs/0/logs/https%3A%2F%2Fcommunity-tc.services.mozilla.com%2Fapi%2Fqueue%2Fv1%2Ftask%2FWWNv1op4QUau10ixVuJfFQ%2Fruns%2F0%2Fartifacts%2Fpublic%2Flogs%2Flive.log#L364-401

… where the previous code would find the string `nightly` in the output of `rustup toolchain list` in a line like `nightly-2020-01-16-x86_64-unknown-linux-gnu` and conclude that that toolchain was already installed.
  • Loading branch information
SimonSapin committed Jan 31, 2020
1 parent 7ac4f9e commit acfbf8c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/servo/command_base.py
Expand Up @@ -1009,7 +1009,12 @@ def ensure_bootstrapped(self, target=None, rustup_components=None):
self.ensure_rustup_version()
toolchain = self.rust_toolchain()

if toolchain.encode("utf-8") not in check_output(["rustup", "toolchain", "list"]):
status = subprocess.call(
["rustup", "run", toolchain.encode("utf-8"), "rustc", "--version"],
stdout=open(os.devnull, "wb"),
stderr=subprocess.STDOUT,
)
if status:
check_call(["rustup", "toolchain", "install", "--profile", "minimal", toolchain])

installed = check_output(
Expand Down

0 comments on commit acfbf8c

Please sign in to comment.