From 88597686cd0a0d0d0f2fbafe726df30d3123bc90 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Wed, 30 Nov 2022 12:30:42 -0500 Subject: [PATCH 1/2] Support detecting if the registry is already installed via tarball --- add_general_registry.jl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/add_general_registry.jl b/add_general_registry.jl index 036a9b2..3a9ce85 100644 --- a/add_general_registry.jl +++ b/add_general_registry.jl @@ -1,12 +1,23 @@ using Pkg -function general_registry_location() +function tarball_general_registry_location() + reg_dir = joinpath(DEPOT_PATH[1], "registries") + general_registry_tarball = joinpath(reg_dir, "General.tar.gz") + registry_toml_file = joinpath(reg_dir, "General.toml") + return general_registry_tarball, registry_toml_file +end + +function cloned_general_registry_location() general_registry_dir = joinpath(DEPOT_PATH[1], "registries", "General") registry_toml_file = joinpath(general_registry_dir, "Registry.toml") return general_registry_dir, registry_toml_file end function general_registry_exists() + general_registry_tarball, registry_toml_file = tarball_general_registry_location() + if isfile(general_registry_tarball) && isfile(registry_toml_file) + return true + end general_registry_dir, registry_toml_file = general_registry_location() if !isdir(general_registry_dir) return false From d87975473da44a7ae3e0fb69b2d408886567ac64 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Wed, 30 Nov 2022 12:31:31 -0500 Subject: [PATCH 2/2] Update add_general_registry.jl --- add_general_registry.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/add_general_registry.jl b/add_general_registry.jl index 3a9ce85..fce71d8 100644 --- a/add_general_registry.jl +++ b/add_general_registry.jl @@ -18,7 +18,7 @@ function general_registry_exists() if isfile(general_registry_tarball) && isfile(registry_toml_file) return true end - general_registry_dir, registry_toml_file = general_registry_location() + general_registry_dir, registry_toml_file = cloned_general_registry_location() if !isdir(general_registry_dir) return false elseif !isfile(registry_toml_file)