mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
Auto merge of #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
This commit is contained in:
commit
d548146c30
@ -155,6 +155,7 @@ export function execute(command: string, options: ExecOptions): Promise<string>
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function executeDiscoverProject(command: string, options: ExecOptions): Promise<string> {
|
export function executeDiscoverProject(command: string, options: ExecOptions): Promise<string> {
|
||||||
|
options = Object.assign({ maxBuffer: 10 * 1024 * 1024 }, options);
|
||||||
log.info(`running command: ${command}`);
|
log.info(`running command: ${command}`);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
exec(command, options, (err, stdout, _) => {
|
exec(command, options, (err, stdout, _) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user