From c917d3fedbd2c21c717ef19c70547e1aeef38ee7 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Tue, 21 Aug 2018 10:48:58 +0200 Subject: [PATCH] Normalize paths before checking isfile. --- src/Literate.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Literate.jl b/src/Literate.jl index f8e0063..59cea0c 100644 --- a/src/Literate.jl +++ b/src/Literate.jl @@ -232,6 +232,7 @@ function script(inputfile, outputdir; preprocess = identity, postprocess = ident name = filename(inputfile), documenter = true, credit = true, keep_comments::Bool=false, kwargs...) # normalize paths + inputfile = normpath(inputfile) isfile(inputfile) || throw(ArgumentError("cannot find inputfile `$(inputfile)`")) inputfile = realpath(abspath(inputfile)) mkpath(outputdir) @@ -311,6 +312,7 @@ function markdown(inputfile, outputdir; preprocess = identity, postprocess = ide codefence::Pair = documenter ? "```@example $(name)" => "```" : "```julia" => "```", kwargs...) # normalize paths + inputfile = normpath(inputfile) isfile(inputfile) || throw(ArgumentError("cannot find inputfile `$(inputfile)`")) inputfile = realpath(abspath(inputfile)) mkpath(outputdir) @@ -415,6 +417,7 @@ function notebook(inputfile, outputdir; preprocess = identity, postprocess = ide execute::Bool=true, documenter::Bool=true, credit = true, name = filename(inputfile), kwargs...) # normalize paths + inputfile = normpath(inputfile) isfile(inputfile) || throw(ArgumentError("cannot find inputfile `$(inputfile)`")) inputfile = realpath(abspath(inputfile)) mkpath(outputdir)