Skip to content

Commit d7efa18

Browse files
authored
Set maxBuffer to avoid ENOBUFS error message
See nodejs/node#23027 and ConsenSys-archive@180359b
1 parent a95edb5 commit d7efa18

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)