From fd738587c386f46895a15be6188888feab2a52b2 Mon Sep 17 00:00:00 2001 From: George Adams Date: Fri, 16 Aug 2024 10:16:19 +0100 Subject: [PATCH] temurin: add support for Alpine Linux --- src/distributions/temurin/installer.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/distributions/temurin/installer.ts b/src/distributions/temurin/installer.ts index 4a1989bca..4a7bb513f 100644 --- a/src/distributions/temurin/installer.ts +++ b/src/distributions/temurin/installer.ts @@ -170,11 +170,16 @@ export class TemurinDistribution extends JavaBase { // Adoptium has own platform names so need to map them switch (process.platform) { case 'darwin': - return 'mac'; + return 'mac'; case 'win32': - return 'windows'; + return 'windows'; + case 'linux': + if (fs.existsSync('/etc/alpine-release')) { + return 'alpine-linux'; + } + return 'linux'; default: - return process.platform; + return process.platform; } } }