Skip to content

Commit

Permalink
Merge pull request #97 from steved/master
Browse files Browse the repository at this point in the history
case insensitive package matching
  • Loading branch information
ant31 authored Jun 22, 2018
2 parents 8aad6c0 + b18adf2 commit b50cbbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions appr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def split_package_name(name):
if len(sp) >= 2:
package_parts["namespace"] = sp[1]
if len(sp) >= 3:
match = re.match(r"^([a-z0-9_-]+?)([:@][a-z0-9._+-]+|@sha256:[a-z0-9]+)?$", sp[2])
match = re.match(r"^([a-z0-9_-]+?)([:@][a-z0-9._+-]+|@sha256:[a-z0-9]+)?$", sp[2], re.I)
package, version = match.groups()
package_parts['package'] = package
package_parts['version'] = version
Expand All @@ -91,7 +91,7 @@ def split_package_name(name):

def parse_package_name(name, regexp=PACKAGE_REGEXP):
package_regexp = regexp
match = re.match(package_regexp, name)
match = re.match(package_regexp, name, re.I)
if match is None:
raise ValueError(
"Package '%s' does not match format 'registry/namespace/name[@version|:channel]'" %
Expand Down

0 comments on commit b50cbbc

Please sign in to comment.