bootstrap: Adding more output when installing dependencies (#31003)

It's often the case (especially with the taplo installation and on
Windows) that bootstrap is doing lots of stuff in the background for a
long amount of time. Without output it's hard to tell what exactly is
going on. This change adds more output to this process as well as
removing some Pythong 2.x era code.
This commit is contained in:
Martin Robinson 2024-01-05 12:14:17 +01:00 committed by GitHub
parent afb0d4c56e
commit 9a1d7aabd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 33 deletions

View file

@ -102,8 +102,8 @@ class Base:
if not force and shutil.which("taplo") is not None:
return False
if subprocess.call(["cargo", "install", "taplo-cli", "--locked"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE) != 0:
print(" * Installing taplo...")
if subprocess.call(["cargo", "install", "taplo-cli", "--locked"]) != 0:
raise EnvironmentError("Installation of taplo failed.")
return True
@ -114,8 +114,8 @@ class Base:
env = dict(os.environ)
env["CARGO_BUILD_RUSTC"] = "rustc"
if subprocess.call(["cargo", "install", "--path", "support/crown"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) != 0:
print(" * Installing crown (the Servo linter)...")
if subprocess.call(["cargo", "install", "--path", "support/crown"], env=env) != 0:
raise EnvironmentError("Installation of crown failed.")
return True