]> git.lyx.org Git - lyx.git/blobdiff - src/support/ForkedCalls.cpp
Remove unneeded mutable keywords
[lyx.git] / src / support / ForkedCalls.cpp
index 0378b05bf1c6e7ab43e907a58cbed1c5be11dad7..63307970b881d1213c3097dd8a778fd36936a8f3 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
@@ -378,7 +381,7 @@ int ForkedCall::generateChild()
                vector<char *>::iterator ait = argv.begin();
                vector<char *>::iterator const aend = argv.end();
                lyxerr << "<command>\n\t" << line
-                      << "\n\tInterpretted as:\n\n";
+                      << "\n\tInterpreted as:\n\n";
                for (; ait != aend; ++ait)
                        if (*ait)
                                lyxerr << '\t'<< *ait << '\n';