Skip to content

Instantly share code, notes, and snippets.

@fredemmott
Last active December 9, 2021 15:02
Show Gist options
  • Save fredemmott/b9ec8b8dd7e902d8713a7cf8f1209b4a to your computer and use it in GitHub Desktop.
Save fredemmott/b9ec8b8dd7e902d8713a7cf8f1209b4a to your computer and use it in GitHub Desktop.
I think we're likely to want more options here in the future, but we should leave them for later.
I don't think we should add full 'do what you want with stderr' or even 'split stderr to another FD', but perhaps:
`foo($command, vec[$args], SubProcess\DISCARD_STDERR)`
A `shape('discard_stderr' => true)` approach instead would give us more flexibility in the future without either:
- using int flags that can't be fully understood by the typechecker
- growing the function signature
I think for the most common case, minimizing the surface area is important.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment