For example, find_exe(["bibtex -min-crossrefs=7"]) should search for
bibtex and if it is found, return the string "bibtex -min-crossrefs=7".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39794
a592a061-630c-0410-9148-
cb99ea01b6c8
def find_exe(candidates):
global extlist, path
- for prog in candidates:
+ for command in candidates:
+ prog = command.split()[0]
for directory in path:
for ext in extlist:
full_path = os.path.join(directory, prog + ext)
# have found it). Return just the basename to avoid
# problems when the path to the executable contains
# spaces.
- return os.path.basename(full_path)
+ return command
return None