aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/platform/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo/platform/base.py')
-rw-r--r--python/servo/platform/base.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/python/servo/platform/base.py b/python/servo/platform/base.py
index b2957941c6e..0e81f149d9e 100644
--- a/python/servo/platform/base.py
+++ b/python/servo/platform/base.py
@@ -59,6 +59,7 @@ class Base:
if not skip_platform:
installed_something |= self._platform_bootstrap(force)
installed_something |= self.install_taplo(force)
+ installed_something |= self.install_cargo_deny(force)
installed_something |= self.install_crown(force)
if not installed_something:
@@ -74,6 +75,16 @@ class Base:
return True
+ def install_cargo_deny(self, force: bool) -> bool:
+ if not force and shutil.which("cargo-deny") is not None:
+ return False
+
+ print(" * Installing cargo-deny...")
+ if subprocess.call(["cargo", "install", "cargo-deny", "--locked"]) != 0:
+ raise EnvironmentError("Installation of cargo-deny failed.")
+
+ return True
+
def install_crown(self, force: bool) -> bool:
print(" * Installing crown (the Servo linter)...")
if subprocess.call(["cargo", "install", "--path", "support/crown"]) != 0: