JuliaTeX / TikzPictures.jl

Creating PGF/TikZ pictures and saving them in various formats
Other
89 stars 28 forks source link

`success` function for testing of lualatex installation throws an exception when not installed #83

Closed dylan-asmar closed 1 year ago

dylan-asmar commented 1 year ago

The use of success(`$(tikzCommand()) -v`) appears throughout as a test of whether lualatex is able to be used. It also shows up in the runtests.jl as success(`lualatex -v`). However, success raises an exception if the process cannot be started (https://docs.julialang.org/en/v1/base/base/#Base.success).

Therefore instead of the intended use of falling back to tectonic, we get the following error:

ERROR: IOError: could not spawn `lualatex -v`: no such file or directory (ENOENT)

I recreated this behavior on Ubuntu and MacOS (M1 processor with some modifications for tectonic use).

We can fix this by creating a helper function that catches the exception of success. I was planning on including it with my pull request for the tectonic_jll change but wanted to submit the issue in case a different approach is preferred.

mykelk commented 1 year ago

Yes, that sounds good. We can use tectonic_jll since we don't need biber.