From 986e59f76346524df492185df12f39c023aa1c04 Mon Sep 17 00:00:00 2001 From: Matthew Quinn Date: Wed, 10 Jul 2024 12:50:01 +0100 Subject: [PATCH] split prebuild commands to avoid using shell, skip first --- pre_build.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pre_build.py b/pre_build.py index 3718df8b37..6416221fdc 100644 --- a/pre_build.py +++ b/pre_build.py @@ -5,14 +5,17 @@ def build() -> None: - if which("yarn") is None: - print("Locust requires the yarn binary to be available in this shell to build the web front-end.\nSee: https://docs.locust.io/en/stable/developing-locust.html#making-changes-to-locust-s-web-ui") - exit(1) if os.environ.get("SKIP_PRE_BUILD", "") == "true": print("Skipping front end build...") return + if which("yarn") is None: + print( + "Locust requires the yarn binary to be available in this shell to build the web front-end.\nSee: https://docs.locust.io/en/stable/developing-locust.html#making-changes-to-locust-s-web-ui" + ) + exit(1) print("Building front end...") - subprocess.run(["make", "frontend_build"]) + subprocess.run(["yarn", "webui:install"]) + subprocess.run(["yarn", "webui:build"]) if __name__ == "__main__":