mirror of https://gitlab.com/ita1024/waf.git
Merge branch 'fix-binary-executable' into 'master'
Only detect binaries with execution permission See merge request ita1024/waf!2349
This commit is contained in:
commit
eeeb29d95b
|
@ -496,12 +496,12 @@ def find_binary(self, filenames, exts, paths):
|
|||
for ext in exts:
|
||||
exe_name = f + ext
|
||||
if os.path.isabs(exe_name):
|
||||
if os.path.isfile(exe_name):
|
||||
if os.path.isfile(exe_name) and os.access(x, os.X_OK):
|
||||
return exe_name
|
||||
else:
|
||||
for path in paths:
|
||||
x = os.path.expanduser(os.path.join(path, exe_name))
|
||||
if os.path.isfile(x):
|
||||
if os.path.isfile(x) and os.access(x, os.X_OK):
|
||||
return x
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in New Issue