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

feat: apply promisifyStream to ProcessPromise exposed streams #978

Closed
antongolub opened this issue Dec 14, 2024 · 3 comments · Fixed by #1023
Closed

feat: apply promisifyStream to ProcessPromise exposed streams #978

antongolub opened this issue Dec 14, 2024 · 3 comments · Fixed by #1023
Labels
ossln24 OSS Library Night 2024

Comments

@antongolub
Copy link
Collaborator

antongolub commented Dec 14, 2024

We've previously added stream extensions to make support mixed piping:

await $`cmd`.pipe(transform).pipe`cmd`

Let's also apply the same approach for ProcessPromise exposed streams:

const p1 = $`cmd`

const p2 = p.stdout.pipe`cmd1`
const p3 = p.stderr.pipe`cmd2`

See util.ts#promisifyStream for details

@antongolub antongolub added the ossln24 OSS Library Night 2024 label Dec 14, 2024
@antongolub
Copy link
Collaborator Author

const p2 = p.pipe.stdout`cmd1`
const p3 = p.pipe.stderr`cmd2`

@antonmedv
Copy link
Collaborator

Why do we need those APIs?

@antongolub
Copy link
Collaborator Author

We can redirect error stream to the next piped process via 2>&1, but not stdall.

antongolub added a commit to antongolub/zx that referenced this issue Dec 25, 2024
continues google#978

fix: add missing fs ref to core
continues google#1001
antongolub added a commit that referenced this issue Dec 25, 2024
* feat: provide stdall piping
continues #978

fix: add missing fs ref to core
continues #1001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ossln24 OSS Library Night 2024
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants