Skip to content

Commit 740eff9

Browse files
IanButterworthKristofferC
authored andcommitted
instantiate: don't update the registry if no env deps exist (#2660)
(cherry picked from commit baec70b)
1 parent ab8f6c8 commit 740eff9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/API.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,9 @@ function instantiate(ctx::Context; manifest::Union{Bool, Nothing}=nothing,
13371337
return instantiate(Context(); manifest=manifest, update_registry=update_registry, verbose=verbose, kwargs...)
13381338
end
13391339
if (!isfile(ctx.env.manifest_file) && manifest === nothing) || manifest == false
1340-
up(ctx; update_registry=update_registry)
1340+
# given no manifest exists, only allow invoking a registry update if there are project deps
1341+
allow_registry_update = isfile(ctx.env.project_file) && !isempty(ctx.env.project.deps)
1342+
up(ctx; update_registry = update_registry && allow_registry_update)
13411343
return
13421344
end
13431345
if !isfile(ctx.env.manifest_file) && manifest == true

0 commit comments

Comments
 (0)