Clean temp directories

citations
Matti Pastell 2019-03-03 14:13:08 +02:00
parent 41dd6a9e37
commit a9120129ab
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ function weave(source ; doctype = :auto,
rm(mdname)
elseif doc.doctype == "md2pdf"
success = run_latex(doc, outname, latex_cmd)
success && rm(doc.fig_path, force = true, recursive = true)
rm(doc.fig_path, force = true, recursive = true)
success || return
outname = get_outname(out_path, doc, ext = "pdf")
end

View File

@ -128,9 +128,9 @@ function run_latex(doc::WeaveDoc, outname, latex_cmd = "xelatex")
catch e
@info(e)
@warn("Error converting document to pdf. Try running with md2tex format and using latex manually")
cd(old_wd)
rm(xname)
rm(textmp, recursive=true)
cd(old_wd)
return false
end
end