Skip to content

Commit

Permalink
Fix package source detection
Browse files Browse the repository at this point in the history
  • Loading branch information
bmhughes committed Aug 31, 2023
1 parent 0b6f697 commit 9aadb78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file is used to list changes made in the last 3 major versions of the postg

## Unreleased

- Fix 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
Expand Down
2 changes: 1 addition & 1 deletion libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 9aadb78

Please sign in to comment.