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

Break down stdio option #15

Closed
ehmicky opened this issue Aug 22, 2024 · 1 comment · Fixed by #26
Closed

Break down stdio option #15

ehmicky opened this issue Aug 22, 2024 · 1 comment · Fixed by #26

Comments

@ehmicky
Copy link
Collaborator

ehmicky commented Aug 22, 2024

Breaking down the stdio option into 3 options (stdin/stdout/stderr) is quite a nice thing. Also, it should be fairly short to implement.

const exampleFunction = ({stdin, stdout, stderr, stdio = [stdin, stdout, stderr], ...options}) => {
  spawn(..., {...options, stdio});
}

We could also limit the documentation of those options:

  • Only document: 'pipe', 'ignore', 'inherit'
  • Do not fully document'overlapped', 'ipc', Node.js stream, file descriptor integer, null/undefined (as an alias for 'pipe'), file descriptors beyond 0/1/2. Only include a link to the Node.js documentation, saying that those values are also available (but not fully documented).

What do you think?

@ehmicky ehmicky mentioned this issue Aug 22, 2024
@sindresorhus
Copy link
Owner

Yes, this is a nice shortcut.

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 a pull request may close this issue.

2 participants