File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -652,9 +652,20 @@ Some commands have an alias, indicated below.
652652end
653653
654654const help = gen_help ()
655+ const REG_WARNED = Ref {Bool} (false )
655656
656657function try_prompt_pkg_add (pkgs:: Vector{Symbol} )
657658 ctx = Context ()
659+ if isempty (ctx. registries)
660+ if ! REG_WARNED[]
661+ printstyled (ctx. io, " │ " ; color= :green )
662+ printstyled (ctx. io, " Attempted to search for missing packages in Pkg registries but no registries are installed.\n " )
663+ printstyled (ctx. io, " └ " ; color= :green )
664+ printstyled (ctx. io, " Use Pkg mode to install a registry. Both `pkg> add` and `pkg> update` will install the default registries.\n\n " )
665+ REG_WARNED[] = true
666+ end
667+ return false
668+ end
658669 available_uuids = [Types. registered_uuids (ctx. registries, String (pkg)) for pkg in pkgs] # vector of vectors
659670 available_pkgs = pkgs[isempty .(available_uuids) .== false ]
660671 isempty (available_pkgs) && return false
You can’t perform that action at this time.
0 commit comments