forked from qt-creator/qt-creator
Terminal: Fix setting environment for stub process
The TerminalInterface was setting the environment of the target process for the stub, this is uneccessary. The ExternalTerminalProcessImpl was not using the environment of the stub process which will be important later. The TerminalProcessImpl was not setting the right environment either. Task-number: QTCREATORBUG-27519 Change-Id: I89238feedd755d1f1cbe2255b71711e0d5c149d0 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -108,6 +108,8 @@ expected_str<qint64> ProcessStubCreator::startStubProcess(const ProcessSetupData
|
|||||||
cmdLine.addCommandLineAsArgs(setupData.m_commandLine, CommandLine::Raw);
|
cmdLine.addCommandLineAsArgs(setupData.m_commandLine, CommandLine::Raw);
|
||||||
process->setCommand(cmdLine);
|
process->setCommand(cmdLine);
|
||||||
}
|
}
|
||||||
|
process->setEnvironment(
|
||||||
|
setupData.m_environment.appliedToEnvironment(Environment::systemEnvironment()));
|
||||||
|
|
||||||
process->setEnvironment(setupData.m_environment);
|
process->setEnvironment(setupData.m_environment);
|
||||||
|
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ void TerminalInterface::start()
|
|||||||
|
|
||||||
QTC_ASSERT(d->stubCreator, return);
|
QTC_ASSERT(d->stubCreator, return);
|
||||||
|
|
||||||
ProcessSetupData stubSetupData = m_setup;
|
ProcessSetupData stubSetupData;
|
||||||
stubSetupData.m_commandLine = cmd;
|
stubSetupData.m_commandLine = cmd;
|
||||||
|
|
||||||
if (m_setup.m_runAsRoot && !HostOsInfo::isWindowsHost()) {
|
if (m_setup.m_runAsRoot && !HostOsInfo::isWindowsHost()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user