From a795e0c970e6c9fac5609bea5ceda2517bf3ca48 Mon Sep 17 00:00:00 2001 From: brother7 <7brother7@gmail.com> Date: Mon, 24 Aug 2026 14:34:55 +0800 Subject: [PATCH] fix(pi): verify Linux compatibility executable --- scripts/lib/pi-product-artifact.mjs | 3 ++- tests/unit/pi-product-artifact.test.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/lib/pi-product-artifact.mjs b/scripts/lib/pi-product-artifact.mjs index fc3b1c5..6ea8c21 100644 --- a/scripts/lib/pi-product-artifact.mjs +++ b/scripts/lib/pi-product-artifact.mjs @@ -23,6 +23,7 @@ import { } from '../probe-pi-packaged-runtime.mjs'; const PRODUCT_NAME = 'Makelore'; +const LINUX_EXECUTABLE_NAME = 'niancode'; const EXTENSION_CONTRACT_MARKERS = Object.freeze([ 'Makelore runtime bridge rejected the request', 'subagent.dispatch', @@ -79,7 +80,7 @@ export function defaultProductExecutable(projectRoot, currentPlatform = hostPlat return join(root, 'release', 'mac', `${PRODUCT_NAME}.app`, 'Contents', 'MacOS', PRODUCT_NAME); } if (currentPlatform === 'linux') { - return join(root, 'release', 'linux-unpacked', PRODUCT_NAME.toLowerCase()); + return join(root, 'release', 'linux-unpacked', LINUX_EXECUTABLE_NAME); } throw new Error(`Unsupported product artifact platform: ${currentPlatform}`); } diff --git a/tests/unit/pi-product-artifact.test.ts b/tests/unit/pi-product-artifact.test.ts index fa4f70a..5dc78b7 100644 --- a/tests/unit/pi-product-artifact.test.ts +++ b/tests/unit/pi-product-artifact.test.ts @@ -94,6 +94,8 @@ describe('final Pi product artifact verification', () => { }); it('uses final unpacked-product paths and strictly parses verifier options', () => { + expect(defaultProductExecutable('/repo', 'linux')) + .toBe(path.resolve('/repo', 'release', 'linux-unpacked', 'niancode')); expect(defaultProductExecutable('D:\\repo', 'win32')) .toBe(path.resolve('D:\\repo', 'release', 'win-unpacked', 'Makelore.exe')); expect(parsePiArtifactVerifierArgs([