File tree 1 file changed +15
-3
lines changed
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):
120
120
return out
121
121
122
122
123
- def get_bin_path (filename ):
123
+ def _choose_bin_path (filename ):
124
124
"""
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.
127
126
"""
128
127
129
128
# check if it's already absolute
@@ -148,6 +147,19 @@ def get_bin_path(filename):
148
147
149
148
return filename
150
149
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
+
151
163
152
164
def get_pg_config (pg_config_path = None ):
153
165
"""
You can’t perform that action at this time.
0 commit comments