Skip to content

Commit ffe6868

Browse files
topolarityKristofferC
authored andcommitted
Fix handling of PackageSpec with un-specified version (#3970)
(cherry picked from commit 15ef1a1)
1 parent 2ff6910 commit ffe6868

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Operations.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,8 +1438,10 @@ function add(ctx::Context, pkgs::Vector{PackageSpec}, new_git=Set{UUID}();
14381438
compat_names = String[]
14391439
for pkg in pkgs
14401440
haskey(ctx.env.project.compat, pkg.name) && continue
1441-
pkgversion = Base.thispatch(ctx.env.manifest[pkg.uuid].version)
1442-
set_compat(ctx.env.project, pkg.name, string(pkgversion))
1441+
v = ctx.env.manifest[pkg.uuid].version
1442+
v === nothing && continue
1443+
pkgversion = string(Base.thispatch(v))
1444+
set_compat(ctx.env.project, pkg.name, pkgversion)
14431445
push!(compat_names, pkg.name)
14441446
end
14451447
printpkgstyle(ctx.io, :Compat, """entries added for $(join(compat_names, ", "))""")

0 commit comments

Comments
 (0)