aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitsunyan2018-03-24 01:57:15 +0000
committerkitsunyan2018-03-24 01:57:15 +0000
commit05151182a757773ded4a7663a95ed80a454d1487 (patch)
tree351af9537f06f497e2a75c9ff2c00f05547a5bac
parent868fc202b7f10296203f05a1869dadd6ae181a37 (diff)
Fix constraints checking
-rw-r--r--src/package.nim4
1 files changed, 2 insertions, 2 deletions
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])