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 6666import os
6767import pickle
6868import re
69+ import shlex
6970import shutil
7071import subprocess
7172import sys
@@ -266,11 +267,11 @@ def pdf(self):
266267 f .write (ref )
267268
268269 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 } " )
271272
272273 proc = subprocess .run (
273- [ make_cmd , command ] ,
274+ command ,
274275 check = False , cwd = tex_dir ,
275276 capture_output = True ,
276277 text = True ,
@@ -279,7 +280,7 @@ def pdf(self):
279280 if proc .returncode != 0 :
280281 logger .error (f"stdout from { make_cmd } :\n { proc .stdout } " )
281282 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 } " )
283284
284285 if proc .stdout :
285286 logger .debug (f"make stdout:\n { proc .stdout } " )
You can’t perform that action at this time.
0 commit comments