mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 22:14:52 -07:00
fix(async): prevent missed async errors from bypassing catch handlers (#13714)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
This commit is contained in:
@@ -191,7 +191,7 @@ export async function start_sandbox(
|
||||
sandboxProcess = spawn(config.command, args, {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
return new Promise((resolve, reject) => {
|
||||
return await new Promise((resolve, reject) => {
|
||||
sandboxProcess?.on('error', reject);
|
||||
sandboxProcess?.on('close', (code) => {
|
||||
process.stdin.resume();
|
||||
@@ -666,7 +666,7 @@ export async function start_sandbox(
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
return new Promise<number>((resolve, reject) => {
|
||||
return await new Promise<number>((resolve, reject) => {
|
||||
sandboxProcess.on('error', (err) => {
|
||||
coreEvents.emitFeedback('error', 'Sandbox process error', err);
|
||||
reject(err);
|
||||
|
||||
Reference in New Issue
Block a user