From fab1cfea1e145e249b98c6afc679eec360822088 Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Mon, 24 Aug 2026 22:57:39 +0200 Subject: [PATCH] Update action.yml --- .github/actions/java/action.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/actions/java/action.yml b/.github/actions/java/action.yml index 6c33e040dd..5ff4afda47 100644 --- a/.github/actions/java/action.yml +++ b/.github/actions/java/action.yml @@ -29,7 +29,8 @@ runs: if [ -z "${architecture}" ]; then architecture="${RUNNER_ARCHITECTURE}" fi - case "${architecture^^}" in + normalized_architecture="$(printf '%s' "${architecture}" | tr '[:lower:]' '[:upper:]')" + case "${normalized_architecture}" in X64|AMD64|X86_64) architecture=X64 ;; ARM64|AARCH64) architecture=ARM64 ;; *) echo "Unsupported runner architecture: ${architecture}" >&2; exit 1 ;; @@ -42,8 +43,13 @@ runs: exit 1 fi - export JAVA_HOME="${java_home}" - export PATH="${java_home}/bin:${PATH}" + shell_java_home="${java_home}" + if command -v cygpath >/dev/null 2>&1; then + shell_java_home="$(cygpath --unix "${java_home}")" + fi + + export JAVA_HOME="${shell_java_home}" + export PATH="${shell_java_home}/bin:${PATH}" echo "JAVA_HOME=${java_home}" >> "${GITHUB_ENV}" echo "${java_home}/bin" >> "${GITHUB_PATH}" java -version 2>&1 | tee "${RUNNER_TEMP}/java-version.txt"