Skip to content

Commit

Permalink
Merge pull request #42 from PumasAI/mh/merge-tomls
Browse files Browse the repository at this point in the history
Merge package info
  • Loading branch information
MichaelHatherly authored Jun 18, 2024
2 parents ff54ffa + b0cf700 commit 94baa82
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/code_stripping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function _generate_stripped_registry(;
stripped_info = get!(Dict, registry_contents, pkg_path)
for (k, v) in info[pkg_path]
k == "Versions.toml" && continue
stripped_info[k] = v
stripped_info[k] = merge(get(Dict, stripped_info, k), v)
end

versions_toml =
Expand All @@ -183,8 +183,6 @@ function _generate_stripped_registry(;

packages[string(package_uuid)] =
Dict("name" => pkg_entry.name, "path" => pkg_path)

break
end
end
end
Expand Down Expand Up @@ -238,7 +236,7 @@ function _write_stripped_registry(stripped_registry, registry_contents)
for (k, v) in data
if endswith(k, ".toml")
open(joinpath(path, k), "w") do io
TOML.print(io, v)
TOML.print(io, v; sorted = true)
end
else
error("Unknown file type: $k")
Expand Down

0 comments on commit 94baa82

Please sign in to comment.