fix: Disable automatic image building if BUILD_SANDBOX is not provided (#764)

This commit is contained in:
Tolik Malibroda
2025-06-05 18:47:39 +02:00
committed by GitHub
parent 4d4cf0f2f9
commit 1d20cedf03
2 changed files with 9 additions and 6 deletions

View File

@@ -285,11 +285,10 @@ export async function start_sandbox(sandbox: string) {
const image = await getSandboxImageName(isCustomProjectSandbox);
const workdir = process.cwd();
// if BUILD_SANDBOX is set or project-specific sandbox.Dockerfile provided,
// then call scripts/build_sandbox.sh under gemini-cli repo
// if BUILD_SANDBOX is set, then call scripts/build_sandbox.sh under gemini-cli repo
//
// note this can only be done with binary linked from gemini-cli repo
if (process.env.BUILD_SANDBOX || isCustomProjectSandbox) {
if (process.env.BUILD_SANDBOX) {
if (!gcPath.includes('gemini-cli/packages/')) {
console.error(
'ERROR: cannot build sandbox using installed gemini binary; ' +