Skip to content

Commit

Permalink
Move JLLs to own folder
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Mar 8, 2023
1 parent 4807c31 commit 29443c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function path(cache::RegistryCache, registry_url::AbstractString)
end

function get_registry_default_branch(git::Cmd)
lines = collect(eachline(`$git remote show origin`))
lines = collect(eachline(`$git remote suhow origin`))
idx = findfirst(x -> occursin("HEAD branch", x), lines)
idx === nothing && error("Failed to get default branch of registry")
strip(split(lines[idx], ":")[2])
Expand Down Expand Up @@ -189,6 +189,7 @@ function package_relpath(pkg::Project)
end
function package_relpath(pkg_name::AbstractString)
path_components = [uppercase(pkg_name[1]), pkg_name]
endswith(pkg_name, "_jll") && pushfirst!(path_components, "jll") #JLLs have own top level folder
path_separator = "/"
return join(path_components, path_separator)
end
Expand Down
3 changes: 3 additions & 0 deletions test/regedit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,9 @@ end

@testset "The `RegistryTools.package_relpath` function" begin
@test RegistryTools.package_relpath("Example") == "E/Example"

# JLLs are in seperate top level directory
@test RegistryTools.package_relpath("Example_jll") == "jll/E/Example_jll"
end

end

0 comments on commit 29443c9

Please sign in to comment.