Fix build_sandbox command (#974)
This commit is contained in:
parent
ad2e47dc20
commit
e1d8a356b0
|
@ -366,7 +366,7 @@ export async function start_sandbox(sandbox: string) {
|
|||
const workdir = path.resolve(process.cwd());
|
||||
const containerWorkdir = getContainerPath(workdir);
|
||||
|
||||
// if BUILD_SANDBOX is set, then call scripts/build_sandbox.sh under gemini-cli repo
|
||||
// if BUILD_SANDBOX is set, then call scripts/build_sandbox.js under gemini-cli repo
|
||||
//
|
||||
// note this can only be done with binary linked from gemini-cli repo
|
||||
if (process.env.BUILD_SANDBOX) {
|
||||
|
@ -389,13 +389,16 @@ export async function start_sandbox(sandbox: string) {
|
|||
console.error(`using ${projectSandboxDockerfile} for sandbox`);
|
||||
buildArgs += `-f ${path.resolve(projectSandboxDockerfile)} -i ${image}`;
|
||||
}
|
||||
execSync(`cd ${gcRoot} && scripts/build_sandbox.sh -s ${buildArgs}`, {
|
||||
execSync(
|
||||
`cd ${gcRoot} && node scripts/build_sandbox.js -s ${buildArgs}`,
|
||||
{
|
||||
stdio: 'inherit',
|
||||
env: {
|
||||
...process.env,
|
||||
GEMINI_SANDBOX: sandbox, // in case sandbox is enabled via flags (see config.ts under cli package)
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue