fix(pi): verify Linux compatibility executable

This commit is contained in:
2026-08-24 14:34:55 +08:00
parent 641f6636b6
commit a795e0c970
2 changed files with 4 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ import {
} from '../probe-pi-packaged-runtime.mjs'; } from '../probe-pi-packaged-runtime.mjs';
const PRODUCT_NAME = 'Makelore'; const PRODUCT_NAME = 'Makelore';
const LINUX_EXECUTABLE_NAME = 'niancode';
const EXTENSION_CONTRACT_MARKERS = Object.freeze([ const EXTENSION_CONTRACT_MARKERS = Object.freeze([
'Makelore runtime bridge rejected the request', 'Makelore runtime bridge rejected the request',
'subagent.dispatch', 'subagent.dispatch',
@@ -79,7 +80,7 @@ export function defaultProductExecutable(projectRoot, currentPlatform = hostPlat
return join(root, 'release', 'mac', `${PRODUCT_NAME}.app`, 'Contents', 'MacOS', PRODUCT_NAME); return join(root, 'release', 'mac', `${PRODUCT_NAME}.app`, 'Contents', 'MacOS', PRODUCT_NAME);
} }
if (currentPlatform === 'linux') { 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}`); throw new Error(`Unsupported product artifact platform: ${currentPlatform}`);
} }

View File

@@ -94,6 +94,8 @@ describe('final Pi product artifact verification', () => {
}); });
it('uses final unpacked-product paths and strictly parses verifier options', () => { 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')) expect(defaultProductExecutable('D:\\repo', 'win32'))
.toBe(path.resolve('D:\\repo', 'release', 'win-unpacked', 'Makelore.exe')); .toBe(path.resolve('D:\\repo', 'release', 'win-unpacked', 'Makelore.exe'));
expect(parsePiArtifactVerifierArgs([ expect(parsePiArtifactVerifierArgs([