Fixed issues related to typed names

This commit is contained in:
alex@thor
2018-03-10 20:43:12 +01:00
parent 18ef736e0d
commit 0af8323d1e
+10 -3
View File
@@ -28,9 +28,16 @@ package body Alire.Root is
return Roots.Root
is
begin
Root := new Roots.Root'(Roots.New_Root (Index.Find (Projects.Image (Project), Version)));
Trace.Debug ("Storing indexed release as root: " & Root.Release.Milestone.Image);
return Root.all;
if Index.Exists (Projects.Image (Project), Version) then
Root := new Roots.Root'(Roots.New_Root (Index.Find (Projects.Image (Project), Version)));
Trace.Debug ("Storing indexed release as root: " & Root.Release.Milestone.Image);
return Root.all;
else
-- Session is outdated or outside
Trace.Debug ("Storing incomplete root for outdated session");
return Set (Projects.Image (Project),
Conditional.For_Dependencies.Empty);
end if;
end Set;
---------