Skip to content

Commit

Permalink
registered_name should return nothing when UUID is not registered
Browse files Browse the repository at this point in the history
  • Loading branch information
00vareladavid committed Dec 29, 2018
1 parent 01f8655 commit 117b335
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function resolve_versions!(
for (uuid, ver) in vers
uuid in uuids && continue
name = registered_name(ctx.env, uuid)
push!(pkgs, PackageSpec(name, uuid, ver))
push!(pkgs, PackageSpec(;name=name, uuid=uuid, version=ver))
end
return vers
end
Expand Down
4 changes: 2 additions & 2 deletions src/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1384,9 +1384,9 @@ function registered_uuid(env::EnvCache, name::String)::Union{Nothing,UUID}
end

# Determine current name for a given package UUID
function registered_name(env::EnvCache, uuid::UUID)::String
function registered_name(env::EnvCache, uuid::UUID)::Union{Nothing,String}
names = registered_names(env, uuid)
length(names) == 0 && return ""
length(names) == 0 && return nothing
length(names) == 1 && return names[1]
values = registered_info(env, uuid, "name")
name = nothing
Expand Down

0 comments on commit 117b335

Please sign in to comment.