diff --git a/buildSrc/src/main/java/NativeRelocator.java b/buildSrc/src/main/java/NativeRelocator.java index f11f682d9..f1788784f 100644 --- a/buildSrc/src/main/java/NativeRelocator.java +++ b/buildSrc/src/main/java/NativeRelocator.java @@ -12,14 +12,15 @@ class NativeRelocator /** * Initializes the NativeRelocator by preparing the environment if necessary. * Executes the appropriate preparation script based on the OS. - * - * @throws Exception if the preparation script fails or an unsupported OS is detected. */ - NativeRelocator(Path rootDirectory) throws Exception + NativeRelocator(Path rootDirectory) { this.rootDirectory = rootDirectory; this.cacheRoot = this.rootDirectory.resolve("cache"); - + } + + private void prepare() throws Exception + { if (this.rootDirectory.resolve(".venv").toFile().exists()) { return; @@ -197,6 +198,7 @@ class NativeRelocator } System.out.println("Relocating to " + outputPath + "..."); + this.prepare(); for (Map.Entry replacement : replacements.entrySet()) {