зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1609832 - Install rustfmt when running mach bootstrap. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60213 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
fe3011c6d5
Коммит
7bc320e0e3
|
@ -751,6 +751,10 @@ class BaseBootstrapper(object):
|
|||
|
||||
Invoke rustup from the given path to update the rust install."""
|
||||
subprocess.check_call([rustup, 'update'])
|
||||
# This installs rustfmt when not already installed, or nothing
|
||||
# otherwise, while the update above would have taken care of upgrading
|
||||
# it.
|
||||
subprocess.check_call([rustup, 'component', 'add', 'rustfmt'])
|
||||
|
||||
def install_rust(self):
|
||||
"""Download and run the rustup installer."""
|
||||
|
@ -774,7 +778,8 @@ class BaseBootstrapper(object):
|
|||
print('Running rustup-init...')
|
||||
subprocess.check_call([rustup_init, '-y',
|
||||
'--default-toolchain', 'stable',
|
||||
'--default-host', platform, ])
|
||||
'--default-host', platform,
|
||||
'--component', 'rustfmt'])
|
||||
cargo_home, cargo_bin = self.cargo_home()
|
||||
self.print_rust_path_advice(RUST_INSTALL_COMPLETE,
|
||||
cargo_home, cargo_bin)
|
||||
|
|
Загрузка…
Ссылка в новой задаче