From 062ce8940e2f2770c94ff349c445d5c26a6d6724 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Mon, 17 Jan 2022 19:34:45 +0100 Subject: [PATCH] Fix detection of installed cargo packages with hyphens in name --- plugins/modules/packaging/language/cargo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/packaging/language/cargo.py b/plugins/modules/packaging/language/cargo.py index b7251887aa..0230d8ad1d 100644 --- a/plugins/modules/packaging/language/cargo.py +++ b/plugins/modules/packaging/language/cargo.py @@ -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)