Skip to content

Commit

Permalink
fixes #398
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Sep 30, 2020
1 parent a1830e0 commit 8f23084
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/run.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ function run_doc(
doc.format = deepcopy(get_format(doctype))

cwd = doc.cwd = get_cwd(doc, out_path)
isdir(cwd) || mkdir(cwd)
mkpath(cwd)

# TODO: provide a way not to create `fig_path` ?
if isnothing(fig_path)
fig_path = if (endswith(doctype, "2pdf") && cache === :off) || endswith(doctype, "2html")
basename(mktempdir(abspath(cwd)))
else
DEFAULT_FIG_PATH
end
end
let d = normpath(cwd, fig_path); isdir(d) || mkdir(d); end
mkpath(normpath(cwd, fig_path))
# This is needed for latex and should work on all output formats
@static Sys.iswindows() && (fig_path = replace(fig_path, "\\" => "/"))
set_rc_params(doc, fig_path, fig_ext)
Expand Down

0 comments on commit 8f23084

Please sign in to comment.