From 4ffea6a2a8085ed6dea482e1602be8595353ee7c Mon Sep 17 00:00:00 2001 From: KristofferC Date: Thu, 18 Mar 2021 14:23:59 +0100 Subject: [PATCH] get rid of this --- src/Registry/Registry.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Registry/Registry.jl b/src/Registry/Registry.jl index f92d9a867f..c27624f323 100644 --- a/src/Registry/Registry.jl +++ b/src/Registry/Registry.jl @@ -192,13 +192,13 @@ function download_registries(io::IO, regs::Vector{RegistrySpec}, depot::String=d else mktempdir() do tmp if reg.path !== nothing && reg.linked == true # symlink to local source - registry = Registry.RegistryInstance(reg.path; parse_packages=false) + registry = Registry.RegistryInstance(reg.path) regpath = joinpath(depot, "registries", registry.name) printpkgstyle(io, :Symlinking, "registry from `$(Base.contractuser(reg.path))`") isdir(dirname(regpath)) || mkpath(dirname(regpath)) symlink(reg.path, regpath) isfile(joinpath(regpath, "Registry.toml")) || Pkg.Types.pkgerror("no `Registry.toml` file in linked registry.") - registry = Registry.RegistryInstance(regpath; parse_packages=false) + registry = Registry.RegistryInstance(regpath) printpkgstyle(io, :Symlinked, "registry `$(Base.contractuser(registry.name))` to `$(Base.contractuser(regpath))`") return elseif url !== nothing && registry_use_pkg_server() @@ -214,7 +214,7 @@ function download_registries(io::IO, regs::Vector{RegistrySpec}, depot::String=d elseif reg.path !== nothing # copy from local source printpkgstyle(io, :Copying, "registry from `$(Base.contractuser(reg.path))`") isfile(joinpath(reg.path, "Registry.toml")) || Pkg.Types.pkgerror("no `Registry.toml` file in source directory.") - registry = Registry.RegistryInstance(reg.path; parse_packages=false) + registry = Registry.RegistryInstance(reg.path) regpath = joinpath(depot, "registries", registry.name) cp(reg.path, regpath; force=true) # has to be cp given we're copying printpkgstyle(io, :Copied, "registry `$(Base.contractuser(registry.name))` to `$(Base.contractuser(regpath))`") @@ -229,12 +229,12 @@ function download_registries(io::IO, regs::Vector{RegistrySpec}, depot::String=d if !isfile(joinpath(tmp, "Registry.toml")) Pkg.Types.pkgerror("no `Registry.toml` file in cloned registry.") end - registry = Registry.RegistryInstance(tmp; parse_packages=false) + registry = Registry.RegistryInstance(tmp) regpath = joinpath(depot, "registries", registry.name) # copy to `depot` ispath(dirname(regpath)) || mkpath(dirname(regpath)) if isfile(joinpath(regpath, "Registry.toml")) - existing_registry = Registry.RegistryInstance(regpath; parse_packages=false) + existing_registry = Registry.RegistryInstance(regpath) if registry.uuid == existing_registry.uuid println(io, "registry `$(registry.name)` already exist in `$(Base.contractuser(regpath))`.") @@ -243,7 +243,7 @@ function download_registries(io::IO, regs::Vector{RegistrySpec}, depot::String=d mv(tmp, regpath, force=true) printpkgstyle(io, :Added, "registry `$(registry.name)` to `$(Base.contractuser(regpath))`") end - elseif registry_use_pkg_server(url) || reg.linked !== true + elseif url !== nothing && registry_use_pkg_server() || reg.linked !== true # if the dir doesn't exist, or exists but doesn't contain a Registry.toml mv(tmp, regpath, force=true) printpkgstyle(io, :Added, "registry `$(registry.name)` to `$(Base.contractuser(regpath))`")