Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from six import iteritems

from .exceptions import ExecUtilException
from .exceptions import ExecUtilException, InvalidOperationException
from .config import testgres_config as tconf
from .raise_error import RaiseError
from .enums import NodeStatus
Expand Down Expand Up @@ -263,7 +263,12 @@ def cache_pg_config_data(cmd):
return cache_pg_config_data(cmd)

# try plain name
return cache_pg_config_data("pg_config")
try:
pg_config_data = cache_pg_config_data("pg_config")
except Exception:
raise InvalidOperationException(
"Failed to determine how to start pg_config. Either specify the path to pg_config in PG_CONFIG or specify the path to the Postgres directory containing pg_config in PG_BIN, or put pg_config into the system PATH.")
return pg_config_data


def get_pg_version2(os_ops: OsOperations, bin_dir=None):
Expand Down