mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-25 19:23:03 -07:00
fix(cli): resolve devtools build issues and update third-party notices
This commit is contained in:
@@ -22,6 +22,16 @@ import { existsSync } from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
// Increase memory limit for all subprocesses (tsc, etc) to prevent OOM in CI.
|
||||
if (
|
||||
!process.env.NODE_OPTIONS ||
|
||||
!process.env.NODE_OPTIONS.includes('max-old-space-size')
|
||||
) {
|
||||
process.env.NODE_OPTIONS = `${
|
||||
process.env.NODE_OPTIONS || ''
|
||||
} --max-old-space-size=8192`.trim();
|
||||
}
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const root = join(__dirname, '..');
|
||||
|
||||
|
||||
@@ -124,6 +124,12 @@ const LINTERS = {
|
||||
function runCommand(command, stdio = 'inherit') {
|
||||
try {
|
||||
const env = { ...process.env };
|
||||
// Increase memory limit for all subprocesses (ESLint, etc) to prevent OOM in CI.
|
||||
if (!env.NODE_OPTIONS || !env.NODE_OPTIONS.includes('max-old-space-size')) {
|
||||
env.NODE_OPTIONS = `${
|
||||
env.NODE_OPTIONS || ''
|
||||
} --max-old-space-size=8192`.trim();
|
||||
}
|
||||
const nodeBin = join(process.cwd(), 'node_modules', '.bin');
|
||||
env.PATH = `${nodeBin}:${TEMP_DIR}/actionlint:${TEMP_DIR}/shellcheck:${PYTHON_VENV_PATH}/bin:${env.PATH}`;
|
||||
execSync(command, { stdio, env });
|
||||
|
||||
Reference in New Issue
Block a user