From 78729a8eea40e9f09fcd0b0009052f9d1cb2eaa5 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 19 Apr 2018 08:54:08 +0200 Subject: [PATCH] cd to output dir when executing notebook --- src/Examples.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Examples.jl b/src/Examples.jl index 1276f78..fb67add 100644 --- a/src/Examples.jl +++ b/src/Examples.jl @@ -391,7 +391,9 @@ function notebook(inputfile, outputdir; preprocess = identity, postprocess = ide @info "executing notebook $(name * ".ipynb")" try # run(`jupyter nbconvert --ExecutePreprocessor.timeout=-1 --to notebook --execute $(abspath(outputfile)) --output $(filename(outputfile)).ipynb`) - nb = execute_notebook(nb) + cd(outputdir) do + nb = execute_notebook(nb) + end catch err @error "error when executing notebook $(name * ".ipynb")" rethrow(err)