forked from qt-creator/qt-creator
Terminal: Fix docker cmd for terminals
* Fix env for terminals Change-Id: Ie16a74aeca3ad34a76af1dee0c5a01e607aabebb Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -314,7 +314,8 @@ void DockerProcessImpl::start()
|
|||||||
if (m_setup.m_lowPriority)
|
if (m_setup.m_lowPriority)
|
||||||
m_process.setLowPriority();
|
m_process.setLowPriority();
|
||||||
|
|
||||||
const bool inTerminal = m_setup.m_terminalMode != TerminalMode::Off;
|
const bool inTerminal = m_setup.m_terminalMode != TerminalMode::Off
|
||||||
|
|| m_setup.m_ptyData.has_value();
|
||||||
|
|
||||||
const bool interactive = m_setup.m_processMode == ProcessMode::Writer
|
const bool interactive = m_setup.m_processMode == ProcessMode::Writer
|
||||||
|| !m_setup.m_writeData.isEmpty() || inTerminal;
|
|| !m_setup.m_writeData.isEmpty() || inTerminal;
|
||||||
|
@@ -137,13 +137,14 @@ void TerminalWidget::setupPty()
|
|||||||
{
|
{
|
||||||
m_process = std::make_unique<QtcProcess>();
|
m_process = std::make_unique<QtcProcess>();
|
||||||
|
|
||||||
Environment env = m_openParameters.environment.value_or(Environment::systemEnvironment());
|
|
||||||
|
|
||||||
CommandLine shellCommand = m_openParameters.shellCommand.value_or(
|
CommandLine shellCommand = m_openParameters.shellCommand.value_or(
|
||||||
CommandLine{TerminalSettings::instance().shell.filePath(),
|
CommandLine{TerminalSettings::instance().shell.filePath(),
|
||||||
TerminalSettings::instance().shellArguments.value(),
|
TerminalSettings::instance().shellArguments.value(),
|
||||||
CommandLine::Raw});
|
CommandLine::Raw});
|
||||||
|
|
||||||
|
Environment env = m_openParameters.environment.value_or(
|
||||||
|
shellCommand.executable().deviceEnvironment());
|
||||||
|
|
||||||
// For git bash on Windows
|
// For git bash on Windows
|
||||||
env.prependOrSetPath(shellCommand.executable().parentDir());
|
env.prependOrSetPath(shellCommand.executable().parentDir());
|
||||||
if (env.hasKey("CLINK_NOAUTORUN"))
|
if (env.hasKey("CLINK_NOAUTORUN"))
|
||||||
|
Reference in New Issue
Block a user