From afa9fff46faaac7c02f7e2867b23e31c0dee8ce9 Mon Sep 17 00:00:00 2001 From: gileri Date: Mon, 17 Jun 2024 17:53:24 +0200 Subject: [PATCH] Use non-greedy dot to match version --- plugins/module_utils/helm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/module_utils/helm.py b/plugins/module_utils/helm.py index 7f9a694c71..edc48f6b0c 100644 --- a/plugins/module_utils/helm.py +++ b/plugins/module_utils/helm.py @@ -184,10 +184,10 @@ def get_helm_binary(self): def get_helm_version(self): command = self.get_helm_binary() + " version" rc, out, err = self.run_command(command) - m = re.match(r'version.BuildInfo{Version:"v([^"]*)",', out) + m = re.match(r'version.BuildInfo{Version:"v(.*?)",', out) if m: return m.group(1) - m = re.match(r'Client: &version.Version{SemVer:"v([^"]*)", ', out) + m = re.match(r'Client: &version.Version{SemVer:"v(.*?)", ', out) if m: return m.group(1) return None