Skip to content

Commit d548146

Browse files
committed
Auto merge of rust-lang#15420 - Wilfred:discover_command_max_buffer, r=Veykril
Increase the buffer size for discover project command The default value for maxBuffer is 1 MiB[1]. If the discover project command returns stdout or stderr that is greater than 1 MiB, the extension would error with "RangeError: stderr maxBuffer length exceeded". Set the default value for maxBuffer to 10 MiB for project discovery. [1] https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback
2 parents ef2ee59 + 0ef541e commit d548146

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

editors/code/src/util.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export function execute(command: string, options: ExecOptions): Promise<string>
155155
}
156156

157157
export function executeDiscoverProject(command: string, options: ExecOptions): Promise<string> {
158+
options = Object.assign({ maxBuffer: 10 * 1024 * 1024 }, options);
158159
log.info(`running command: ${command}`);
159160
return new Promise((resolve, reject) => {
160161
exec(command, options, (err, stdout, _) => {

0 commit comments

Comments
 (0)