From e416aa6a10d56e0634cde38447bf85345d331bf6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 19:33:30 +0000 Subject: [PATCH] Improve: Use consistent ExecOptions type and proper fallback for maxBuffer Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com> --- packages/server/src/utils/process/execAsync.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/utils/process/execAsync.ts b/packages/server/src/utils/process/execAsync.ts index 78d830b7f..b95096539 100644 --- a/packages/server/src/utils/process/execAsync.ts +++ b/packages/server/src/utils/process/execAsync.ts @@ -15,12 +15,12 @@ const MAX_EXEC_BUFFER_SIZE = 100 * 1024 * 1024; export const execAsync = async ( command: string, - options?: { cwd?: string; env?: NodeJS.ProcessEnv; shell?: string }, + options?: ExecOptions & { shell?: string }, ): Promise<{ stdout: string; stderr: string }> => { try { const result = await execAsyncBase(command, { ...options, - maxBuffer: MAX_EXEC_BUFFER_SIZE, + maxBuffer: options?.maxBuffer ?? MAX_EXEC_BUFFER_SIZE, }); return { stdout: result.stdout.toString(), @@ -64,7 +64,7 @@ export const execAsyncStream = ( const childProcess = exec( command, - { maxBuffer: MAX_EXEC_BUFFER_SIZE, ...options }, + { ...options, maxBuffer: options?.maxBuffer ?? MAX_EXEC_BUFFER_SIZE }, (error) => { if (error) { reject(