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)