diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index 07060d65b0..e7821c6cd9 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -6,6 +6,7 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; +import { getErrorMessage } from '../utils/errors.js'; import { SandboxPolicyManager } from '../policy/sandboxPolicyManager.js'; import { inspect } from 'node:util'; import process from 'node:process'; @@ -451,7 +452,6 @@ import { McpClientManager } from '../tools/mcp-client-manager.js'; import { A2AClientManager } from '../agents/a2a-client-manager.js'; import { type McpContext } from '../tools/mcp-client.js'; import type { EnvironmentSanitizationConfig } from '../services/environmentSanitization.js'; -import { getErrorMessage } from '../utils/errors.js'; export type { FileFilteringOptions }; export { diff --git a/scripts/sandbox_command.js b/scripts/sandbox_command.js index 00becb667f..9fb50d036e 100644 --- a/scripts/sandbox_command.js +++ b/scripts/sandbox_command.js @@ -70,7 +70,11 @@ if (!geminiSandbox) { geminiSandbox = process.env.GEMINI_SANDBOX; } -geminiSandbox = (geminiSandbox || '').toLowerCase(); +if (typeof geminiSandbox === 'object' && geminiSandbox !== null) { + geminiSandbox = geminiSandbox.enabled ? 'true' : 'false'; +} + +geminiSandbox = (geminiSandbox || '').toString().toLowerCase(); const commandExists = (cmd) => { const checkCommand = os.platform() === 'win32' ? 'where' : 'command -v';