From: Enrico Forestieri Date: Sun, 13 Feb 2022 03:57:27 +0000 (+0100) Subject: Fix bug #12466 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=777ccce5617aea9b15f27902b9133146eff4e87b;p=features.git Fix bug #12466 Amend 109ea2be by reintroducing the command prefix that was inadvertently removed. The prefix sets the proper environment for latex. --- diff --git a/src/support/ForkedCalls.cpp b/src/support/ForkedCalls.cpp index e770c4df68..b9462153e0 100644 --- a/src/support/ForkedCalls.cpp +++ b/src/support/ForkedCalls.cpp @@ -305,6 +305,8 @@ int ForkedCall::generateChild() if (command_.empty()) return 1; + string const prefixed_command = cmd_prefix_ + command_; + #if !defined (_WIN32) // POSIX @@ -312,8 +314,8 @@ int ForkedCall::generateChild() // in a contiguous block of memory. The array contains pointers // to each word. // Don't forget the terminating `\0' character. - char const * const c_str = command_.c_str(); - vector vec(c_str, c_str + command_.size() + 1); + char const * const c_str = prefixed_command.c_str(); + vector vec(c_str, c_str + prefixed_command.size() + 1); // Splitting the command up into an array of words means replacing // the whitespace between words with '\0'. Life is complicated @@ -377,7 +379,7 @@ int ForkedCall::generateChild() if (lyxerr.debugging(Debug::FILES)) { vector::iterator ait = argv.begin(); vector::iterator const aend = argv.end(); - lyxerr << "\n\t" << command_ + lyxerr << "\n\t" << prefixed_command << "\n\tInterpreted as:\n\n"; for (; ait != aend; ++ait) if (*ait)