Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Dec 7, 2024
1 parent d61fabb commit 854575f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2736,18 +2736,14 @@ function print_status(env::EnvCache, old_env::Union{Nothing,EnvCache}, registrie
printstyled(io, pkg_str; color=Base.warn_color())
end
end
# show if loaded and version doesn't match
# show if loaded version and version in the manifest doesn't match
pkg_spec = something(pkg.new, pkg.old)
pkgid = Base.PkgId(pkg.uuid, pkg_spec.name)
m = get(Base.loaded_modules, pkgid, nothing)
if m isa Module && pkg_spec.version !== nothing
loaded_path = pathof(m)
env_path = Base.locate_package(pkgid)
if loaded_path === nothing || env_path === nothing
@show pkgid pkg_spec m loaded_path env_path
end

if !samefile(loaded_path, env_path)
env_path = Base.locate_package(pkgid) # nothing if not installed
if loaded_path !== nothing && env_path !== nothing &&!samefile(loaded_path, env_path)
loaded_version = pkgversion(m)
env_version = pkg_spec.version
if loaded_version !== env_version
Expand Down

0 comments on commit 854575f

Please sign in to comment.