From 901afa8c71505ad8f6aa1118e59d8c876fee84bb Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sun, 22 Sep 2019 22:13:31 +0100 Subject: [PATCH] Further fix for #432. --- src/nimble.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/nimble.nim b/src/nimble.nim index 27e4774..634d191 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -200,12 +200,13 @@ proc processDeps(pkginfo: PackageInfo, options: Options): seq[PackageInfo] = # in the path. var pkgsInPath: StringTableRef = newStringTable(modeCaseSensitive) for pkgInfo in result: + let currentVer = pkgInfo.getConcreteVersion(options) if pkgsInPath.hasKey(pkgInfo.name) and - pkgsInPath[pkgInfo.name] != pkgInfo.version: + pkgsInPath[pkgInfo.name] != currentVer: raise newException(NimbleError, "Cannot satisfy the dependency on $1 $2 and $1 $3" % - [pkgInfo.name, pkgInfo.version, pkgsInPath[pkgInfo.name]]) - pkgsInPath[pkgInfo.name] = pkgInfo.getConcreteVersion(options) + [pkgInfo.name, currentVer, pkgsInPath[pkgInfo.name]]) + pkgsInPath[pkgInfo.name] = currentVer # We add the reverse deps to the JSON file here because we don't want # them added if the above errorenous condition occurs