Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 149ada9

Browse files
authored
Merge pull request #3138 from chmanie/patch-1
Set `maxBuffer` to avoid ENOBUFS error message
2 parents 41c0272 + d7efa18 commit 149ada9

File tree

1 file changed

+5
-1
lines changed
  • packages/compile-solidity/compilerSupplier/loadingStrategies

1 file changed

+5
-1
lines changed

packages/compile-solidity/compilerSupplier/loadingStrategies/Docker.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ const semver = require("semver");
66
const LoadingStrategy = require("./LoadingStrategy");
77
const VersionRange = require("./VersionRange");
88

9+
// Set a sensible limit for maxBuffer
10+
// See https://github.com/nodejs/node/pull/23027
11+
const maxBuffer = 1024 * 1024 * 10;
12+
913
class Docker extends LoadingStrategy {
1014
async load() {
1115
const versionString = await this.validateAndGetSolcVersion();
@@ -16,7 +20,7 @@ class Docker extends LoadingStrategy {
1620

1721
try {
1822
return {
19-
compile: options => String(execSync(command, { input: options })),
23+
compile: options => String(execSync(command, { input: options, maxBuffer })),
2024
version: () => versionString
2125
};
2226
} catch (error) {

0 commit comments

Comments
 (0)