Fix a gitignore bug

This only came up when you generate more than one package in the same
Julia session. The mutating `append!` function was adding stuff to the
global variable that the coverage plugins were using for their
gitignores. The new `vcat` is non-mutating.
This commit is contained in:
Chris de Graaf 2019-11-09 00:26:59 +07:00
parent 4d70635d3a
commit 8edafa6fe5
No known key found for this signature in database
GPG Key ID: 150FFDD9B0073C7B

View File

@ -62,7 +62,7 @@ end
# Create the .gitignore. # Create the .gitignore.
function hook(p::Git, t::Template, pkg_dir::AbstractString) function hook(p::Git, t::Template, pkg_dir::AbstractString)
ignore = mapreduce(gitignore, append!, t.plugins) ignore = mapreduce(gitignore, vcat, t.plugins)
# Only ignore manifests at the repo root. # Only ignore manifests at the repo root.
p.manifest || "Manifest.toml" in ignore || push!(ignore, "/Manifest.toml") p.manifest || "Manifest.toml" in ignore || push!(ignore, "/Manifest.toml")
unique!(sort!(ignore)) unique!(sort!(ignore))