From a06312b33d73c6a074cefb7d584e99fff09d6d62 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Fri, 4 Apr 2014 21:51:08 +0200 Subject: [PATCH] Issue 3874: lilypond-book: Fix TEXINPUTS environment manipulation on W32 This transfers the TEXINPUTS manipulation into the mingw32 workaround where it was not previously being done. --- python/book_latex.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/book_latex.py b/python/book_latex.py index 22dc3a5f19..ec5412b1d8 100644 --- a/python/book_latex.py +++ b/python/book_latex.py @@ -207,7 +207,13 @@ def get_latex_textwidth (source, global_options): output_filename = os.path.join(output_dir, 'output.txt') # call command cmd += " > %s" % output_filename + oldtexinputs = os.environ.get ('TEXINPUTS') + os.environ['TEXINPUTS'] = run_env['TEXINPUTS'] returncode = os.system(cmd) + if oldtexinputs: + os.environ['TEXINPUTS'] = oldtexinputs + else: + del os.environ['TEXINPUTS'] parameter_string = open(output_filename).read() if returncode != 0: warning (_ ("Unable to auto-detect default settings:\n")) -- 2.39.5