]> git.lyx.org Git - lyx.git/blobdiff - src/support/ForkedCalls.cpp
Cmake build: Omit also hidden header files from globbing
[lyx.git] / src / support / ForkedCalls.cpp
index 0378b05bf1c6e7ab43e907a58cbed1c5be11dad7..00dca3e8587648d3666999e2ca693e70a47bb81d 100644 (file)
@@ -282,7 +282,7 @@ int ForkedCall::startScript(Starttype wait, string const & what)
                return retval_;
        }
 
-       command_ = trim(what);
+       command_ = commandPrep(trim(what));
        signal_.reset();
        return run(Wait);
 }
@@ -290,7 +290,7 @@ int ForkedCall::startScript(Starttype wait, string const & what)
 
 int ForkedCall::startScript(string const & what, SignalTypePtr signal)
 {
-       command_ = trim(what);
+       command_ = commandPrep(trim(what));
        signal_  = signal;
 
        return run(DontWait);
@@ -303,7 +303,10 @@ int ForkedCall::generateChild()
        if (command_.empty())
                return 1;
 
-       string const line = cmd_prefix_ + command_;
+       // Make sure that a V2 python is run, if available.
+       string const line = cmd_prefix_ +
+               (prefixIs(command_, "python -tt")
+                ? os::python() + command_.substr(10) : command_);
 
 #if !defined (_WIN32)
        // POSIX