Fix: Enhance binary pattern matching with system and architecture replacements
All checks were successful
Test Action / test (push) Successful in 14s

This commit is contained in:
2026-04-06 23:33:46 +02:00
parent 01d844f6d9
commit cbfadf3488

View File

@@ -216,9 +216,15 @@ async function run() {
let binaryPattern: string | RegExp; let binaryPattern: string | RegExp;
if (binarySource.startsWith('~')) { if (binarySource.startsWith('~')) {
binaryPattern = new RegExp(binarySource.substring(1), 'i'); const binaryRegex = binarySource
.substring(1)
.replace(/{{SYSTEM}}/g, platformInfo.systemPattern)
.replace(/{{ARCH}}/g, platformInfo.archPattern);
binaryPattern = new RegExp(binaryRegex, 'i');
} else { } else {
binaryPattern = binarySource; binaryPattern = binarySource
.replace(/{{SYSTEM}}/g, platformInfo.system)
.replace(/{{ARCH}}/g, platformInfo.arch);
} }
const binaryPath = findBinary(extractDir, binaryPattern, options.debug, console.log); const binaryPath = findBinary(extractDir, binaryPattern, options.debug, console.log);