mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix bug #7718 (Configure fails if shell autorun commands are enabled in the registry)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39554 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3d82ff41ec
commit
1126e3dfd8
@ -60,7 +60,12 @@ def cmdOutput(cmd):
|
|||||||
'''utility function: run a command and get its output as a string
|
'''utility function: run a command and get its output as a string
|
||||||
cmd: command to run
|
cmd: command to run
|
||||||
'''
|
'''
|
||||||
pipe = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, \
|
if os.name == 'nt':
|
||||||
|
b = False
|
||||||
|
cmd = 'cmd /d /c ' + cmd
|
||||||
|
else:
|
||||||
|
b = True
|
||||||
|
pipe = subprocess.Popen(cmd, shell=b, close_fds=b, stdin=subprocess.PIPE, \
|
||||||
stdout=subprocess.PIPE, universal_newlines=True)
|
stdout=subprocess.PIPE, universal_newlines=True)
|
||||||
pipe.stdin.close()
|
pipe.stdin.close()
|
||||||
output = pipe.stdout.read()
|
output = pipe.stdout.read()
|
||||||
@ -1106,9 +1111,14 @@ def checkLatexConfig(check_config, bool_docbook):
|
|||||||
cl.close()
|
cl.close()
|
||||||
#
|
#
|
||||||
# we have chklayouts.tex, then process it
|
# we have chklayouts.tex, then process it
|
||||||
pipe = subprocess.Popen([LATEX, "wrap_chkconfig.ltx"], \
|
cmd = LATEX + ' wrap_chkconfig.ltx'
|
||||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
|
if os.name == 'nt':
|
||||||
universal_newlines=True)
|
b = False
|
||||||
|
cmd = 'cmd /d /c ' + cmd
|
||||||
|
else:
|
||||||
|
b = True
|
||||||
|
pipe = subprocess.Popen(cmd, shell=b, close_fds=b, stdin=subprocess.PIPE, \
|
||||||
|
stdout=subprocess.PIPE, universal_newlines=True)
|
||||||
pipe.stdin.close()
|
pipe.stdin.close()
|
||||||
while True:
|
while True:
|
||||||
line = pipe.stdout.readline()
|
line = pipe.stdout.readline()
|
||||||
|
Loading…
Reference in New Issue
Block a user