Skip to content

Commit

Permalink
check that log file exist before trying to read it (#246)
Browse files Browse the repository at this point in the history
* check that log file exist before trying to read it
  • Loading branch information
Kristoffer Carlsson authored Aug 31, 2020
1 parent d8da1bc commit d1903ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ function run_latex_once(filename::AbstractString, eng::LaTeXEngine, flags)
success(cmd)
end
logfile = _replace_fileext(filename, ".log")
log = read(logfile, String)
log = if !isfile(logfile)
@warn "failed to find logfile at $(repr(logfile))"
""
else
read(logfile, String)
end
succ, log, cmd
end

Expand Down

0 comments on commit d1903ec

Please sign in to comment.