From 42189392200cc460aca17dc84100a426b9f49f4b Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 18 Oct 2023 16:50:05 -0400 Subject: [PATCH] Make sure windows correctly switch java versions in integTest (#330) Signed-off-by: Peter Zhu --- build.gradle | 2 +- vars/runIntegTestScript.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index fb9836091..35f12b50d 100644 --- a/build.gradle +++ b/build.gradle @@ -120,7 +120,7 @@ jacocoTestReport { } } -String version = '5.10.0' +String version = '5.10.1' task updateVersion { doLast { diff --git a/vars/runIntegTestScript.groovy b/vars/runIntegTestScript.groovy index 9cb366672..068ad544a 100644 --- a/vars/runIntegTestScript.groovy +++ b/vars/runIntegTestScript.groovy @@ -23,7 +23,7 @@ void call(Map args = [:]) { if (filename == 'opensearch' && platform == 'windows') { // Windows use scoop to switch the Java Version String javaVersionNumber = javaVersion.replaceAll("[^0-9]", "") // Only get number echo("Switching to Java ${javaVersionNumber} on Windows Docker Container") - sh("scoop reset `scoop list jdk | grep ${javaVersionNumber} | head -1 | cut -d ' ' -f1`") + sh("scoop reset `scoop list jdk | cut -d ' ' -f1 | grep ${javaVersionNumber} | head -1`") } echo "Possible Java Home: ${javaHomeCommand}"