Fix bug #6873: Shell execution of \nonstopmode tried when no latex binary present

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35236 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-08-30 15:02:36 +00:00
parent 9e45d81441
commit ac33a77dac

View File

@ -1190,10 +1190,13 @@ def checkTeXAllowSpaces():
if lyx_check_config: if lyx_check_config:
msg = "Checking whether TeX allows spaces in file names... " msg = "Checking whether TeX allows spaces in file names... "
writeToFile('a b.tex', r'\message{working^^J}' ) writeToFile('a b.tex', r'\message{working^^J}' )
if os.name == 'nt': if LATEX != '':
latex_out = cmdOutput(LATEX + r""" "\nonstopmode\input{\"a b\"}" """) if os.name == 'nt':
latex_out = cmdOutput(LATEX + r""" "\nonstopmode\input{\"a b\"}" """)
else:
latex_out = cmdOutput(LATEX + r""" '\nonstopmode\input{"a b"}' """)
else: else:
latex_out = cmdOutput(LATEX + r""" '\nonstopmode\input{"a b"}' """) latex_out = ''
if 'working' in latex_out: if 'working' in latex_out:
logger.info(msg + 'yes') logger.info(msg + 'yes')
tex_allows_spaces = 'true' tex_allows_spaces = 'true'