diff --git a/source/dub/dependency.d b/source/dub/dependency.d index ad63db7..bf440b9 100644 --- a/source/dub/dependency.d +++ b/source/dub/dependency.d @@ -76,8 +76,10 @@ */ int opCmp(ref const Version other) const { - if(isBranch || other.isBranch) - throw new Exception("Can't compare branch versions! (this: %s, other: %s)".format(this, other)); + if(isBranch || other.isBranch) { + if(sVersion == other.sVersion) return 0; + else throw new Exception("Can't compare branch versions! (this: %s, other: %s)".format(this, other)); + } size_t v[] = toArray(); size_t ov[] = other.toArray();