Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/CodeTracking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,10 @@ Returns `nothing` if this package has not been loaded.
pkgfiles(name::AbstractString, uuid::UUID) = pkgfiles(PkgId(uuid, name))
function pkgfiles(name::AbstractString)
project = Base.active_project()
uuid = Base.project_deps_get(project, name)
uuid == false && error("no package ", name, " recognized")
return pkgfiles(name, uuid)
# The value returned by Base.project_deps_get depends on the Julia version
id = Base.project_deps_get(project, name)
(id == false || id === nothing) && error("no package ", name, " recognized")
return isa(id, PkgId) ? pkgfiles(id) : pkgfiles(name, id)
end
pkgfiles(id::PkgId) = get(_pkgfiles, id, nothing)

Expand Down