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

Pipes #4

Closed
karlicoss opened this issue Jan 19, 2020 · 2 comments
Closed

Pipes #4

karlicoss opened this issue Jan 19, 2020 · 2 comments

Comments

@karlicoss
Copy link
Contributor

verso main.rs lib.rs | recto build chap1.tex chap2.tex blog/home.md

Pipes are pretty neat for that, I like it!

I guess the downside is that pipefail isn't on by default in most shells, so it might confuse the users if verso fails but recto succeeds nevertheless?

This won't be an issue at the moment I guess since if verso terminates early, you wouldn't have valid JSON emitted which would make recto fail anyway. So just keeping it here, perhaps it's good to emphasise that pipes are safe to use in this case so people don't have to worry about it.

@nickpascucci
Copy link
Owner

Yep, if verso fails it'll cause bad input to recto. This will get more complicated in the parallelized/streaming version I want to implement but for now it's not a huge issue.

One thing this does remind me of, though, is that the error messages need to go to stderr or they'll corrupt the pipe... I should replace println! with eprintln!.

@nickpascucci
Copy link
Owner

Added a little section to the README discussing this in cb79f33.

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

2 participants