From 05151182a757773ded4a7663a95ed80a454d1487 Mon Sep 17 00:00:00 2001 From: kitsunyan Date: Sat, 24 Mar 2018 04:57:15 +0300 Subject: Fix constraints checking --- src/package.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/package.nim b/src/package.nim index 32bc801..c3ab6f4 100644 --- a/src/package.nim +++ b/src/package.nim @@ -157,7 +157,7 @@ proc isProvidedBy*(package: PackageReference, by: PackageReference): bool = true else: let lcon = package.constraint.unsafeGet - let rcon = package.constraint.unsafeGet + let rcon = by.constraint.unsafeGet let cmp = vercmp(lcon.version, rcon.version) checkConstraints(lcon.operation, rcon.operation, cmp) else: @@ -228,7 +228,7 @@ proc parseSrcInfoName(repo: string, name: string, baseIndex: int, baseCount: int else: (none(string), name) - if workName.match(re"([^><=]*)\ *(>|<|=|>=|<=)\ *([^ ]*)", matches): + if workName.match(re"([^><=]*)\ *(=|>=|<=|>|<)\ *([^ ]*)", matches): let constraints = toSeq(enumerate[ConstraintOperation]()) let index = constraints.map(s => $s).find(matches[1]) -- cgit v1.2.3-70-g09d2