Skip to content

Commit

Permalink
Merge pull request #1236 from inosik/bootstrapper/compare-versions
Browse files Browse the repository at this point in the history
Compare SemVers instead of strings
  • Loading branch information
forki committed Nov 19, 2015
2 parents e7c4f89 + a85337b commit ea24a00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Paket.Bootstrapper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ private static void StartPaketBootstrapping(IDownloadStrategy downloadStrategy,
}
else
{
if (!localVersion.StartsWith(latestVersion, StringComparison.OrdinalIgnoreCase))
var currentSemVer = SemVer.Create(localVersion);
var latestSemVer = SemVer.Create(latestVersion);
if (currentSemVer.CompareTo(latestSemVer) != 0)
{
downloadStrategy.DownloadVersion(latestVersion, dlArgs.Target, silent);
if (!silent)
Expand Down

0 comments on commit ea24a00

Please sign in to comment.