From 4eb20d5ce8b7fe016f35a4a7c8c449ff4d17698e Mon Sep 17 00:00:00 2001 From: s809 <43530948+s809@users.noreply.github.com> Date: Fri, 24 Jan 2025 11:28:51 +0500 Subject: [PATCH] Fix using wrong path on linux --- buildSrc/src/main/java/RelocateNatives.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/RelocateNatives.java b/buildSrc/src/main/java/RelocateNatives.java index 688d00f99..ff0cb1854 100644 --- a/buildSrc/src/main/java/RelocateNatives.java +++ b/buildSrc/src/main/java/RelocateNatives.java @@ -51,7 +51,15 @@ class RelocateNatives ProcessBuilder processBuilder = new ProcessBuilder(); processBuilder.directory(new File(System.getProperty("user.dir"))); - processBuilder.command("./.venv/Scripts/python", "./relocate_natives/process.py", outputFilePath.toString()); + + if (Path.of(System.getProperty("user.dir"), ".venv/Scripts").toFile().exists()) + { + processBuilder.command("./.venv/Scripts/python", "./relocate_natives/process.py", outputFilePath.toString()); + } + else + { + processBuilder.command("./.venv/bin/python", "./relocate_natives/process.py", outputFilePath.toString()); + } Process process = processBuilder.start(); CompletableFuture outputFuture = CompletableFuture.runAsync(() -> {