Skip to content

Commit 521cf11

Browse files
add default registry if none provided during pkg install prompt (#2862)
1 parent 0d6a726 commit 521cf11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/REPLMode/REPLMode.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,10 @@ const help = gen_help()
655655

656656
function try_prompt_pkg_add(pkgs::Vector{Symbol})
657657
ctx = Context()
658+
if isempty(ctx.registries)
659+
Registry.download_default_registries(ctx.io)
660+
ctx = Context()
661+
end
658662
available_uuids = [Types.registered_uuids(ctx.registries, String(pkg)) for pkg in pkgs] # vector of vectors
659663
available_pkgs = pkgs[isempty.(available_uuids) .== false]
660664
isempty(available_pkgs) && return false

0 commit comments

Comments
 (0)