From c831360a8c2a041c51e51500f3e09cc164b53364 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 11 Oct 2024 16:10:28 -0400 Subject: [PATCH] Get relative to project root. Relative path not working on windows bc windows had gradle wrapper path Signed-off-by: Craig Perkins --- .../src/main/java/org/opensearch/gradle/VersionProperties.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/org/opensearch/gradle/VersionProperties.java b/buildSrc/src/main/java/org/opensearch/gradle/VersionProperties.java index d08ad17647d53..74e5073862ede 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/VersionProperties.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/VersionProperties.java @@ -143,7 +143,8 @@ private static void tomlVersionsToProperties(TomlTable tomlTable, Properties pro private static Properties getVersionProperties() { TomlParseResult toml = null; try { - toml = Toml.parse(Path.of("gradle/libs.versions.toml")); + Path path = Path.of(System.getProperty("user.dir"), "gradle/libs.versions.toml"); + toml = Toml.parse(path); } catch (IOException e) { throw new RuntimeException(e); }