Skip to content

Commit

Permalink
Fix regex used to parse installed apk packages
Browse files Browse the repository at this point in the history
Fixes #1027
  • Loading branch information
simonhammes committed Oct 31, 2024
1 parent 9ce7ac4 commit a117948
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyinfra/facts/apk.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

from .util.packaging import parse_packages

APK_REGEX = r"^([a-zA-Z0-9\-_]+)-([0-9\.]+\-?[a-z0-9]*)\s"
# Source: https://superuser.com/a/1472405
# Modified to return version and release inside a single group and removed extra capturing groups
APK_REGEX = r"(.+)-([^-]+-r[^-]+) \S+ \{\S+\} \(.+?\)"


class ApkPackages(FactBase):
Expand Down

0 comments on commit a117948

Please sign in to comment.