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

Support for piping together two or more commands #847

Open
amigalemming opened this issue Jan 5, 2024 · 0 comments
Open

Support for piping together two or more commands #847

amigalemming opened this issue Jan 5, 2024 · 0 comments

Comments

@amigalemming
Copy link

I guess this has been asked for a thousand times, but I cannot find it in the Docs or FAQ.

I want to do this the proper way:

do (Stdout stream) <- cmd "producer"
   cmd_ "consumer" (StdinBS stream)

However, it will not work, because consumer is only started after producer finished. I would need to add fork:

do (Stdout stream) <- fork $ cmd "producer"
   cmd_ "consumer" (StdinBS stream)

But we are in the Action monad, thus no fork available. :-(

If a pipe connection is currently not possible, then please implement it. If it is already possible, please document it. At least, this ticket might be an anchor for other ones looking for a solution.

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

No branches or pull requests

1 participant