diff options
| author | bors <bors@rust-lang.org> | 2023-08-15 12:13:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-15 12:13:12 +0000 |
| commit | d548146c3000985b493ca45c1f2faab2ae21ea41 (patch) | |
| tree | f035f8db00349fcbaf38509e7584e4275d7ad564 | |
| parent | ef2ee59631f9a0f62ff03b54befdef363675ceed (diff) | |
| parent | 0ef541e535c9d301a62fe039c6904e4d82a5c824 (diff) | |
| download | rust-d548146c3000985b493ca45c1f2faab2ae21ea41.tar.gz rust-d548146c3000985b493ca45c1f2faab2ae21ea41.zip | |
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
| -rw-r--r-- | editors/code/src/util.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/editors/code/src/util.ts b/editors/code/src/util.ts index 1e83c281a13..0414ea0f806 100644 --- a/editors/code/src/util.ts +++ b/editors/code/src/util.ts @@ -155,6 +155,7 @@ export function execute(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}`); return new Promise((resolve, reject) => { exec(command, options, (err, stdout, _) => { |
