MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / runVerifyStep

Function runVerifyStep

apps/kimi-code/scripts/native/05-verify.mjs:4–25  ·  view source on GitHub ↗
({ requireGatekeeper = false } = {})

Source from the content-addressed store, hash-verified

2import { nativeBinPath, targetTriple } from './paths.mjs';
3
4export async function runVerifyStep({ requireGatekeeper = false } = {}) {
5 if (process.platform !== 'darwin') {
6 console.log('Verify step skipped (not macOS)');
7 return;
8 }
9
10 const target = targetTriple();
11 const executable = nativeBinPath(target);
12
13 console.log(`==> codesign -dv ${executable}`);
14 await run('codesign', ['-dv', '--verbose=2', executable]);
15
16 if (requireGatekeeper) {
17 // spctl in 'install' mode simulates the Gatekeeper online check — only a
18 // fully notarized binary passes. Ad-hoc signed binaries fail, so this is
19 // only run under the release profile.
20 console.log(`==> spctl -a -vvv -t install ${executable}`);
21 await run('spctl', ['-a', '-vvv', '-t', 'install', executable]);
22 } else {
23 console.log('Skipping spctl check (requireGatekeeper=false)');
24 }
25}
26
27if (import.meta.url === `file://${process.argv[1]}`) {
28 const requireGatekeeper = process.env.KIMI_VERIFY_GATEKEEPER === '1';

Callers 2

build.mjsFile · 0.90
05-verify.mjsFile · 0.85

Calls 4

targetTripleFunction · 0.90
nativeBinPathFunction · 0.90
runFunction · 0.90
logMethod · 0.65

Tested by

no test coverage detected