From b669a1403890b447e8114a68bc91bcb5394cbeb1 Mon Sep 17 00:00:00 2001 From: "Nicholas W. M. Ritchie" Date: Wed, 13 Jul 2022 09:35:48 -0400 Subject: [PATCH 1/2] Force deletion of the temporary figure path to address Issue #440 --- src/run.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/run.jl b/src/run.jl index b47aa97..1486f19 100644 --- a/src/run.jl +++ b/src/run.jl @@ -90,6 +90,8 @@ function run_doc( @info "Weaved all chunks" progress=1 _id=PROGRESS_ID cd_back() popdisplay(report) # ensure display pops out even if internal error occurs + # Temporary fig_path is not automatically removed because it contains files so... + startswith(fig_path, "jl_") && rm(normpath(cwd, fig_path), force=true, recursive=true) end return doc From b022a54458cf3901640f9f8958cce1c1d1807647 Mon Sep 17 00:00:00 2001 From: "Nicholas W. M. Ritchie" Date: Wed, 13 Jul 2022 09:51:59 -0400 Subject: [PATCH 2/2] Add isnothing(fig_path) check --- src/run.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/run.jl b/src/run.jl index 1486f19..45e99d2 100644 --- a/src/run.jl +++ b/src/run.jl @@ -91,7 +91,7 @@ function run_doc( cd_back() popdisplay(report) # ensure display pops out even if internal error occurs # Temporary fig_path is not automatically removed because it contains files so... - startswith(fig_path, "jl_") && rm(normpath(cwd, fig_path), force=true, recursive=true) + !isnothing(fig_path) && startswith(fig_path, "jl_") && rm(normpath(cwd, fig_path), force=true, recursive=true) end return doc