mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-03 10:01:22 +02:00
fix find_program() bug: no result in not-win sys
This commit is contained in:
parent
cbe7e7c9cb
commit
c083835261
@ -31,7 +31,7 @@ def find_program(*filenames):
|
|||||||
paths = os.environ.get('PATH', '').split(os.pathsep)
|
paths = os.environ.get('PATH', '').split(os.pathsep)
|
||||||
suffixes = ('win32' in sys.platform) and '.exe .com .bat .cmd' or ''
|
suffixes = ('win32' in sys.platform) and '.exe .com .bat .cmd' or ''
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
for name in [filename+ext for ext in suffixes.split()]:
|
for name in [filename+ext for ext in suffixes.split(' ')]:
|
||||||
for directory in paths:
|
for directory in paths:
|
||||||
full_path = os.path.join(directory, name)
|
full_path = os.path.join(directory, name)
|
||||||
if os.path.isfile(full_path):
|
if os.path.isfile(full_path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user