Skip to content

Commit 90ab804

Browse files
authored
Merge pull request #94 from postgrespro/87-get_pg_version-fails-for-postgres-installed-with-homebrew
problem with get_pg_version in Homebrew
2 parents 1e2255f + eafa7f0 commit 90ab804

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

testgres/utils.py

+3
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ def get_pg_version():
179179
_params = [get_bin_path('postgres'), '--version']
180180
raw_ver = tconf.os_ops.exec_command(_params, encoding='utf-8')
181181

182+
# Remove "(Homebrew)" if present
183+
raw_ver = raw_ver.replace('(Homebrew)', '').strip()
184+
182185
# cook version of PostgreSQL
183186
version = raw_ver.strip().split(' ')[-1] \
184187
.partition('devel')[0] \

0 commit comments

Comments
 (0)