mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 23:15:58 -06:00
Fixed binary path issue on Windows platform. refs #5370
This commit is contained in:
parent
09693d14d1
commit
2fdde6218a
@ -200,12 +200,10 @@ def validate_binary_path():
|
||||
(utility if os.name != 'nt' else
|
||||
(utility + '.exe'))))
|
||||
|
||||
# Replace the spaces with '\'
|
||||
full_path = full_path.replace(" ", "\\ ")
|
||||
|
||||
try:
|
||||
# Get the output of the '--version' command
|
||||
version_string = subprocess.getoutput(full_path + ' --version')
|
||||
version_string = \
|
||||
subprocess.getoutput('"{0}" --version'.format(full_path))
|
||||
# Get the version number by splitting the result string
|
||||
version_string.split(") ", 1)[1].split('.', 1)[0]
|
||||
except Exception:
|
||||
|
@ -309,14 +309,13 @@ def set_binary_path(binary_path, bin_paths, server_type,
|
||||
full_path = os.path.abspath(
|
||||
os.path.join(binary_path, (utility if os.name != 'nt' else
|
||||
(utility + '.exe'))))
|
||||
# Replace the spaces with '\'
|
||||
full_path = full_path.replace(" ", "\\ ")
|
||||
|
||||
try:
|
||||
# if version_number is provided then no need to fetch it.
|
||||
if version_number is None:
|
||||
# Get the output of the '--version' command
|
||||
version_string = subprocess.getoutput(full_path + ' --version')
|
||||
version_string = \
|
||||
subprocess.getoutput('"{0}" --version'.format(full_path))
|
||||
|
||||
# Get the version number by splitting the result string
|
||||
version_number = \
|
||||
|
Loading…
Reference in New Issue
Block a user