From 32194ad1c2f2c866b9e33729744eb685bc573ba8 Mon Sep 17 00:00:00 2001 From: Gerrit Grunwald Date: Mon, 26 Apr 2021 12:11:12 +0200 Subject: [PATCH] fix for openlogic mac builds --- dist/cleanup/index.js | 2 +- dist/setup/index.js | 7 ++++--- src/constants.ts | 2 +- src/installer.ts | 9 ++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 406689ed..b28cac8b 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -1043,7 +1043,7 @@ exports.DISTROS = [ 'microsoft', 'ojdk_build', 'oracle_openjdk', - 'open_logic', + 'openlogic', 'sap_machine', 'trava', 'zulu' diff --git a/dist/setup/index.js b/dist/setup/index.js index 7c5dafd0..8f53d957 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -25780,7 +25780,7 @@ exports.DISTROS = [ 'microsoft', 'ojdk_build', 'oracle_openjdk', - 'open_logic', + 'openlogic', 'sap_machine', 'trava', 'zulu' @@ -33687,7 +33687,7 @@ function getDownloadInfo(refs, version, arch, javaPackage, distro = 'zulu') { distribution = distro.toLowerCase(); } else { - throw new Error(`distro argument '${distro}' is not in [aoj | aoj_openj9 | corretto | dragonwell | liberica | microsoft | ojdk_build | open_logic | oracle_openjdk | sap_machine | trava | zulu]`); + throw new Error(`distro argument '${distro}' is not in [aoj | aoj_openj9 | corretto | dragonwell | liberica | microsoft | ojdk_build | openlogic | oracle_openjdk | sap_machine | trava | zulu]`); } } else { @@ -33701,7 +33701,8 @@ function getDownloadInfo(refs, version, arch, javaPackage, distro = 'zulu') { else { if (process.platform === 'darwin') { operatingSystem = 'macos'; - archiveType = ((distribution === 'liberica') || (distribution === 'open_logic')) ? 'zip' : 'tar.gz'; + let zipArchive = distribution === 'liberica' || distribution === 'openlogic'; + archiveType = zipArchive ? 'zip' : 'tar.gz'; } else { operatingSystem = 'linux'; diff --git a/src/constants.ts b/src/constants.ts index 10ce9eb9..ca7e12c9 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -28,7 +28,7 @@ export const DISTROS: string[] = [ 'microsoft', 'ojdk_build', 'oracle_openjdk', - 'open_logic', + 'openlogic', 'sap_machine', 'trava', 'zulu' diff --git a/src/installer.ts b/src/installer.ts index e512b3a3..22ed92a8 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -213,7 +213,7 @@ async function getDownloadInfo( distribution = distro.toLowerCase(); } else { throw new Error( - `distro argument '${distro}' is not in [aoj | aoj_openj9 | corretto | dragonwell | liberica | microsoft | ojdk_build | open_logic | oracle_openjdk | sap_machine | trava | zulu]` + `distro argument '${distro}' is not in [aoj | aoj_openj9 | corretto | dragonwell | liberica | microsoft | ojdk_build | openlogic | oracle_openjdk | sap_machine | trava | zulu]` ); } } else { @@ -226,10 +226,9 @@ async function getDownloadInfo( } else { if (process.platform === 'darwin') { operatingSystem = 'macos'; - archiveType = - distribution === 'liberica' || distribution === 'open_logic' - ? 'zip' - : 'tar.gz'; + let zipArchive = + distribution === 'liberica' || distribution === 'openlogic'; + archiveType = zipArchive ? 'zip' : 'tar.gz'; } else { operatingSystem = 'linux'; archiveType = distribution === 'ojdk_build' ? 'zip' : 'tar.gz';