Merge branch 'fix-binary-executable' into 'master'

Only detect binaries with execution permission

See merge request ita1024/waf!2349
This commit is contained in:
ita1024 2023-10-21 08:02:18 +00:00
commit eeeb29d95b
1 changed files with 2 additions and 2 deletions

View File

@ -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