Skip to content

Commit

Permalink
some pkgbuild has no quotation mark in arch
Browse files Browse the repository at this point in the history
  • Loading branch information
isjerryxiao committed Sep 5, 2019
1 parent 5316507 commit fe3b51f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def get_arch_from_pkgbuild(fpath):
with open(fpath, 'r') as f:
for line in f.read().split('\n'):
if line.startswith('arch='):
matches = re.findall('[\'\"]([^\'\"]+)[\'\"]', line)
matches = re.findall('[()\s\'\"]([\w]+)[()\s\'\"]', line)
if not matches:
raise TypeError('Unexpected PKGBUILD format')
matches = [arch for arch in matches if arch in ARCHS]
Expand Down

0 comments on commit fe3b51f

Please sign in to comment.