Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 261931f

Browse files
committed
search binary again in windows build
1 parent ae55833 commit 261931f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

testgres/utils.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,9 @@ def execute_utility(args, logfile=None):
120120
return out
121121

122122

123-
def get_bin_path(filename):
123+
def _choose_bin_path(filename):
124124
"""
125-
Return absolute path to an executable using PG_BIN or PG_CONFIG.
126-
This function does nothing if 'filename' is already absolute.
125+
Worker function for get_bin_path.
127126
"""
128127

129128
# check if it's already absolute
@@ -148,6 +147,19 @@ def get_bin_path(filename):
148147

149148
return filename
150149

150+
def get_bin_path(filename):
151+
"""
152+
Return absolute path to an executable using PG_BIN or PG_CONFIG.
153+
This function does nothing if 'filename' is already absolute.
154+
"""
155+
156+
filename = _choose_bin_path(filename)
157+
158+
# Windows should find executable again for suffixes
159+
if sys.platform == 'win32':
160+
return find_executable(filename)
161+
return filename
162+
151163

152164
def get_pg_config(pg_config_path=None):
153165
"""

0 commit comments

Comments
 (0)