File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 66
66
import os
67
67
import pickle
68
68
import re
69
+ import shlex
69
70
import shutil
70
71
import subprocess
71
72
import sys
@@ -266,11 +267,11 @@ def pdf(self):
266
267
f .write (ref )
267
268
268
269
make_cmd = os .environ .get ('MAKE' , 'make' )
269
- command = 'all-pdf'
270
- logger .debug (f"Running { make_cmd } { command } in { tex_dir } " )
270
+ command = shlex . split ( make_cmd ) + [ 'all-pdf' ]
271
+ logger .debug (f"Running { ' ' . join ( command ) } in { tex_dir } " )
271
272
272
273
proc = subprocess .run (
273
- [ make_cmd , command ] ,
274
+ command ,
274
275
check = False , cwd = tex_dir ,
275
276
capture_output = True ,
276
277
text = True ,
@@ -279,7 +280,7 @@ def pdf(self):
279
280
if proc .returncode != 0 :
280
281
logger .error (f"stdout from { make_cmd } :\n { proc .stdout } " )
281
282
logger .error (f"stderr from { make_cmd } :\n { proc .stderr } " )
282
- raise RuntimeError (f"failed to run { make_cmd } { command } in { tex_dir } " )
283
+ raise RuntimeError (f"failed to run { ' ' . join ( command ) } in { tex_dir } " )
283
284
284
285
if proc .stdout :
285
286
logger .debug (f"make stdout:\n { proc .stdout } " )
You can’t perform that action at this time.
0 commit comments