Skip to content

Commit c1e5d8a

Browse files
author
ficapy
committed
fixup pipBulkShow function to prevent breaking with numerous names
1 parent 8a21e88 commit c1e5d8a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/pyright-scip/src/virtualenv/environment.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ function pipList(): PipInformation[] {
3333
}
3434

3535
function pipBulkShow(names: string[]): string[] {
36-
// TODO: This probably breaks with enough names. Should batch them into 512 or whatever the max for bash would be
36+
const maxBuffer = 1024 * 1024 * 10; // 10MB
3737
return child_process
38-
.execSync(`${getPipCommand()} show -f ${names.join(' ')}`)
39-
.toString()
38+
.spawnSync(getPipCommand(), ['show', '-f', `${names.join(' ')}`], {maxBuffer})
39+
.stdout.toString()
4040
.split('---');
4141
}
4242

0 commit comments

Comments
 (0)