blacktex icon indicating copy to clipboard operation
blacktex copied to clipboard

Exit code

Open clbarnes opened this issue 2 years ago • 4 comments

Playing around with blacktex, am I right in thinking that it returns an error code if anything was changed? It's definitely helpful to have a way of checking whether a document is valid, but it's also useful to be able to tell the difference between a successful pass of the formatter and a failed pass of the formatter without having to dig into the error code itself. Would you consider an exit code of 0 for formats which succeeded but changed things, but a --check flag which would raise an error code if anything needed changing?

clbarnes avatar Mar 21 '22 10:03 clbarnes

It should actually do that if you use --in-place.

nschloe avatar Mar 21 '22 11:03 nschloe

Sorry, just to clarify - does --in-place raise nonzero for unformatted files, but still format them anyway? And that's different behaviour to being unable to format a file? If you give multiple infiles, does it abort halfway through or wait until the end?

clbarnes avatar Mar 25 '22 16:03 clbarnes

I don't know by heart. Best try it out and let me know if you find anything weird.

nschloe avatar Mar 25 '22 17:03 nschloe

Have you found anything yet?

nschloe avatar May 02 '22 13:05 nschloe