From 515e9efe78a612055e27f6d0ea068b885b9d6578 Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 18 Jun 2026 22:18:27 +0200 Subject: [PATCH] Fix musl/alpine detection --- src/github.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/github.ts b/src/github.ts index 90a8afa..e50780f 100644 --- a/src/github.ts +++ b/src/github.ts @@ -45,7 +45,12 @@ export function expectedAssetName() { const arch = mapArch(); if (plat === 'windows') return `sfw-free-windows-${arch}.exe`; if (plat === 'macos') return `sfw-free-macos-${arch}`; - if (plat === 'linux') return `sfw-free-linux-${arch}`; + if (plat === 'linux') { + const isMusl = + fs.existsSync('/lib/ld-musl-x86_64.so.1') || + fs.existsSync('/lib/ld-musl-aarch64.so.1'); + return `sfw-free-${isMusl ? 'musl-' : ''}linux-${arch}`; + } // If we get here, there's no published combo throw new Error(`No published asset for ${process.platform}/${process.arch}`); }