mirror of
https://github.com/servo/servo.git
synced 2025-06-09 00:53:26 +00:00
mach: always call ensure_bootstrapped
before call_rustup_run
This commit is contained in:
parent
e96bcea669
commit
6f70a9c1de
2 changed files with 2 additions and 1 deletions
|
@ -360,7 +360,7 @@ class CommandBase(object):
|
||||||
|
|
||||||
def call_rustup_run(self, args, **kwargs):
|
def call_rustup_run(self, args, **kwargs):
|
||||||
if self.config["tools"]["use-rustup"]:
|
if self.config["tools"]["use-rustup"]:
|
||||||
self.ensure_rustup_version()
|
assert self.context.bootstrapped
|
||||||
args = ["rustup" + BIN_SUFFIX, "run", "--install", self.rust_toolchain()] + args
|
args = ["rustup" + BIN_SUFFIX, "run", "--install", self.rust_toolchain()] + args
|
||||||
else:
|
else:
|
||||||
args[0] += BIN_SUFFIX
|
args[0] += BIN_SUFFIX
|
||||||
|
|
|
@ -310,6 +310,7 @@ class MachCommands(CommandBase):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def install_rustfmt(self):
|
def install_rustfmt(self):
|
||||||
|
self.ensure_bootstrapped()
|
||||||
with open(os.devnull, "w") as devnull:
|
with open(os.devnull, "w") as devnull:
|
||||||
if self.call_rustup_run(["cargo", "fmt", "--version", "-q"],
|
if self.call_rustup_run(["cargo", "fmt", "--version", "-q"],
|
||||||
stderr=devnull) != 0:
|
stderr=devnull) != 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue