Skip to content

Commit

Permalink
[DEBUG] What about cd'ing into the tmpdir?
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira committed May 24, 2024
1 parent 7e0c0a2 commit 48dc289
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 48dc289

Please sign in to comment.