diff --git a/packages/cli/index.ts b/packages/cli/index.ts index ade92995e1..f13d4707b0 100644 --- a/packages/cli/index.ts +++ b/packages/cli/index.ts @@ -75,11 +75,7 @@ async function getMemoryNodeArgs(): Promise { } async function run() { - if ( - !process.env['GEMINI_CLI_NO_RELAUNCH'] && - !process.env['SANDBOX'] && - process.env['IS_BINARY'] !== 'true' - ) { + if (!process.env['GEMINI_CLI_NO_RELAUNCH'] && !process.env['SANDBOX']) { // --- Lightweight Parent Process / Daemon --- // We avoid importing heavy dependencies here to save ~1.5s of startup time. diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx index b9cda80d8b..f64c3a9cfd 100644 --- a/packages/cli/src/gemini.tsx +++ b/packages/cli/src/gemini.tsx @@ -126,11 +126,7 @@ export function getNodeMemoryArgs(isDebugMode: boolean): string[] { ); } - if ( - process.env['IS_BINARY'] === 'true' || - process.env['GEMINI_CLI_NO_RELAUNCH'] || - process.env['SANDBOX'] - ) { + if (process.env['GEMINI_CLI_NO_RELAUNCH']) { return []; } diff --git a/scripts/build_binary.js b/scripts/build_binary.js index 5d32cb92d0..c2e0c8490f 100644 --- a/scripts/build_binary.js +++ b/scripts/build_binary.js @@ -230,6 +230,19 @@ if (includeNativeModules) { ); } + // Copy @github/keytar to staging + const githubSrc = join(root, 'node_modules/@github'); + const githubStaging = join(stagingDir, 'node_modules/@github'); + + if (existsSync(githubSrc)) { + mkdirSync(dirname(githubStaging), { recursive: true }); + cpSync(githubSrc, githubStaging, { recursive: true }); + } else { + console.warn( + 'Warning: @github/keytar not found in node_modules. Secure keychain features will use file fallback.', + ); + } + // Sign Staged .node files try { const nodeFiles = globSync('**/*.node', { @@ -351,6 +364,7 @@ if (existsSync(ripgrepVendorDest)) { // Add assets from Staging if (includeNativeModules) { addAssetsFromDir('node_modules/@lydell', 'node_modules/@lydell'); + addAssetsFromDir('node_modules/@github', 'node_modules/@github'); } writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));