Fixed nondeterminism in version sorting

This commit is contained in:
Yuriy Glukhov 2017-09-20 18:18:22 +03:00
commit a247047089

View file

@ -630,9 +630,13 @@ proc listPaths(options: Options) =
v.version = newVersion(pkgInfo.specialVersion)
if nimbleLinkTargetPath.len == 0:
v.path = options.getPkgsDir / (pkgInfo.name & '-' & pkgInfo.specialVersion)
installed.add(v)
else:
# If we have a nimble-developed package, this is really the path we're
# looking for.
v.path = nimbleLinkTargetPath
installed.add(v)
installed = @[v]
break
else:
display("Warning:", "No .nimble file found for " & path, Warning,
MediumPriority)