From 48dc289f63dc1c5dfd20d813e931910e238fcab1 Mon Sep 17 00:00:00 2001 From: Abel Soares Siqueira Date: Fri, 24 May 2024 15:57:40 +0200 Subject: [PATCH] [DEBUG] What about cd'ing into the tmpdir? --- test/runtests.jl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 4b112841..b0d44fce 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -33,12 +33,19 @@ template_options = Dict( @show pwd() @show @__DIR__ - COPIERTemplate.generate(tmpdir1; data = template_options, vcs_ref = "HEAD") - bash_args = vcat([["-d"; "$k=$v"] for (k, v) in template_options]...) - ignore(line) = startswith("_commit")(line) || startswith("_src_path")(line) template_path = joinpath(@__DIR__, "..") - run(`copier copy --vcs-ref HEAD $bash_args $template_path $tmpdir2`) + cd(tmpdir1) do + COPIERTemplate.generate("."; data = template_options, vcs_ref = "HEAD") + end + + bash_args = vcat([["-d"; "$k=$v"] for (k, v) in template_options]...) + + cd(tmpdir2) do + run(`copier copy --vcs-ref HEAD $bash_args $template_path .`) + end + + ignore(line) = startswith("_commit")(line) || startswith("_src_path")(line) for (root, dirs, files) in walkdir(tmpdir1) for file in files file1 = joinpath(root, file)