]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3874: lilypond-book: Fix TEXINPUTS environment manipulation on W32
authorDavid Kastrup <dak@gnu.org>
Sat, 22 Feb 2014 19:54:11 +0000 (20:54 +0100)
committerDavid Kastrup <dak@gnu.org>
Wed, 26 Feb 2014 08:55:53 +0000 (09:55 +0100)
python/book_latex.py

index 5f062c537525b729428f99e209d4b41fa0d929d6..a3b2b18b78907134b3b9c0e4035d473fc6f3d52a 100644 (file)
@@ -189,11 +189,12 @@ def get_latex_textwidth (source, global_options):
 
     progress (_ ("Running `%s' on file `%s' to detect default page settings.\n")
               % (global_options.latex_program, tmpfile))
-    cmd = 'TEXINPUTS="%s:$TEXINPUTS" %s %s' \
-        % (global_options.input_dir, global_options.latex_program, tmpfile)
+    cmd = '%s %s' % (global_options.latex_program, tmpfile)
     debug ("Executing: %s\n" % cmd)
     run_env = os.environ.copy()
     run_env['LC_ALL'] = 'C'
+    run_env['TEXINPUTS'] = '%s:%s' % \
+                           (global_options.input_dir, run_env.get('TEXINPUTS',""))
 
     ### unknown why this is necessary
     universal_newlines = True