Skip to content

Commit

Permalink
VCI-116: Fix modules installation (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
krankenbro authored Aug 13, 2021
1 parent d3a45e3 commit fda8365
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions PlatformTools/Build.PackageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ internal partial class Build
continue;
}

if (!string.IsNullOrEmpty(module.Version) && externalModule.Version.CompareTo(module.Version) > 0)
{
Logger.Error($"The latest available version of module ${module.Id} is ${externalModule.Version}, but entered: ${module.Version}");
continue;
}

module.Id = externalModule.Id;
module.Version = module.Version.EmptyToNull() ?? externalModule.Version.ToString();

Expand Down Expand Up @@ -259,11 +265,14 @@ private bool NeedToInstallPlatform(string version)
.Except(modulesToInstall)
.OfType<ManifestModuleInfo>()
.ToList();

modulesToInstall.AddRange(missingModules);
}
modulesToInstall.ForEach(module =>
{
module.DependsOn.Clear();
});
moduleInstaller.Install(modulesToInstall, progress);

moduleInstaller.Install(modulesToInstall.Where(m => !m.IsInstalled), progress);
localModuleCatalog.Reload();
});

Expand Down

0 comments on commit fda8365

Please sign in to comment.