conventional-changelog / standard-version

:trophy: Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org
ISC License
7.69k stars 794 forks source link

lib/run-exec.js should switch child_process.exec to child_process.spawn to void maximum buffer size #398

Open atom-yang opened 5 years ago

atom-yang commented 5 years ago

When I set a npm script npm run build in a standard-version life cycle such as prerelease:

  "standard-version": {
    "scripts": {
      "prerelease": "npm run build"
    }
  }

And an error happened: stderr maxBuffer length exceeded

In standard-version/lib/run-exec.js, using child_process.exec to run the commands in life cycles, and child_process.exec's maxBuffer is 200 * 1024 by default.

So can we use child_process.spawn or set a larger buffer size to avoid this probem?

Thanks.

bcoe commented 5 years ago

@atom-yang would the simplest approach be to simply increase the buffer size? would you like to submit a patch.