File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff 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
152164def get_pg_config (pg_config_path = None ):
153165 """
You can’t perform that action at this time.
0 commit comments