From 4c1193904f429745a455c235d0d5e328d145dfe3 Mon Sep 17 00:00:00 2001 From: "Benjamin M. Hughes" Date: Thu, 31 Aug 2023 11:35:32 +0100 Subject: [PATCH] Fix package source detection --- CHANGELOG.md | 2 ++ libraries/helpers.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a7e469c..e7c2648a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ This file is used to list changes made in the last 3 major versions of the postg ## Unreleased +- First package source detection when other packages matching the postgresql name are installed + ## 11.7.0 - *2023-08-21* - Add insert position option for access resources diff --git a/libraries/helpers.rb b/libraries/helpers.rb index 26353ed9..93a745a8 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -42,7 +42,7 @@ def installed_postgresql_major_version end def installed_postgresql_package_source - pgsql_package = node['packages'].filter { |p| p.match?(/postgresql-?(\d+)?$/) } + pgsql_package = node['packages'].filter { |p| p.match?(/^postgresql-?(\d+)?$/) } raise 'Unable to determine installed PostgreSQL version' if nil_or_empty?(pgsql_package)