Skip to content

Commit c29f708

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

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
@@ -1435,7 +1435,9 @@ function instantiate(ctx::Context; manifest::Union{Bool, Nothing}=nothing,
14351435
return instantiate(Context(); manifest=manifest, update_registry=update_registry, verbose=verbose, kwargs...)
14361436
end
14371437
if (!isfile(ctx.env.manifest_file) && manifest === nothing) || manifest == false
1438-
up(ctx; update_registry=update_registry)
1438+
# given no manifest exists, only allow invoking a registry update if there are project deps
1439+
allow_registry_update = isfile(ctx.env.project_file) && !isempty(ctx.env.project.deps)
1440+
up(ctx; update_registry = update_registry && allow_registry_update)
14391441
return
14401442
end
14411443
if !isfile(ctx.env.manifest_file) && manifest == true

0 commit comments

Comments
 (0)