Skip to content

Commit

Permalink
Fix handling of PackageSpec with un-specified version (#3970)
Browse files Browse the repository at this point in the history
  • Loading branch information
topolarity authored Aug 10, 2024
1 parent 7aef1f0 commit 15ef1a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1516,8 +1516,10 @@ function add(ctx::Context, pkgs::Vector{PackageSpec}, new_git=Set{UUID}();
compat_names = String[]
for pkg in pkgs
haskey(ctx.env.project.compat, pkg.name) && continue
pkgversion = Base.thispatch(ctx.env.manifest[pkg.uuid].version)
set_compat(ctx.env.project, pkg.name, string(pkgversion))
v = ctx.env.manifest[pkg.uuid].version
v === nothing && continue
pkgversion = string(Base.thispatch(v))
set_compat(ctx.env.project, pkg.name, pkgversion)
push!(compat_names, pkg.name)
end
printpkgstyle(ctx.io, :Compat, """entries added for $(join(compat_names, ", "))""")
Expand Down

0 comments on commit 15ef1a1

Please sign in to comment.