Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add buffer option to be able to disable buffering #133

Merged
merged 7 commits into from Aug 20, 2018

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Apr 6, 2018

Fixes #127

The issue describes adding a buffer: false option, which seemed to be in conflict with the maxBuffer option that's already supported, so rather than adding a new option this PR disables buffering of stdio when maxBuffer: null is used.

@sindresorhus
Copy link
Owner

maxBuffer: null could also mean that it should buffer indefinitely. It's ambiguous. I prefer buffer: false as it's explicit.

@sindresorhus
Copy link
Owner

@spalger Still interested in finishing this?

@spalger
Copy link
Contributor Author

spalger commented Jul 20, 2018

@sindresorhus yep, sorry, got lost in the pile. Should be good to go now

@@ -358,7 +380,7 @@ test('err.code is 3', code, 3);
test('err.code is 4', code, 4);

test('timeout will kill the process early', async t => {
const err = await t.throws(m('delay', ['3000', '0'], {timeout: 1500}));
const err = await t.throws(m('delay', ['60000', '0'], {timeout: 1500}));
Copy link
Contributor Author

@spalger spalger Jul 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this in an effort to fix the AppVeyor failure here: https://ci.appveyor.com/project/sindresorhus/execa/build/1.0.337

Not sure if this others see this type of failure regularly, but it passes locally and shouldn't be effected by my changes, so I'm not sure what else I should do about it. (note: I initially tried a delay 5 seconds and that wasn't enough to get it passing on AppVeyor)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor is known for being really slow and annoying. The usual fix is what you've done and just increase the timeouts a lot.

@sindresorhus sindresorhus changed the title Disable buffering with maxBuffer: null Add buffer option to be able to disable buffering Aug 20, 2018
@sindresorhus sindresorhus merged commit 50384aa into sindresorhus:master Aug 20, 2018
@sindresorhus
Copy link
Owner

Thank you 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants