From a2470470899ac31a3dbf6631f6171179aeee870d Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Wed, 20 Sep 2017 18:18:22 +0300 Subject: [PATCH] Fixed nondeterminism in version sorting --- src/nimble.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nimble.nim b/src/nimble.nim index 9b9de0b..0af471e 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -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)