1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix detection of installed cargo packages with hyphens in name

This commit is contained in:
jack1142 2022-01-17 19:34:45 +01:00 committed by GitHub
parent 5540dab382
commit 062ce8940e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,7 +112,7 @@ class Cargo(object):
cmd = ["install", "--list"]
data, dummy = self._exec(cmd, True, False, False)
package_regex = re.compile(r"^(\w+) v(.+):$")
package_regex = re.compile(r"^([\w\-]+) v(.+):$")
installed = {}
for line in data.splitlines():
package_info = package_regex.match(line)