diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index b7ff64ab9e3..c001cfb0b10 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -314,7 +314,8 @@ void DockerProcessImpl::start() if (m_setup.m_lowPriority) 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 || !m_setup.m_writeData.isEmpty() || inTerminal; diff --git a/src/plugins/terminal/terminalwidget.cpp b/src/plugins/terminal/terminalwidget.cpp index 65c19576cff..6ece9394c02 100644 --- a/src/plugins/terminal/terminalwidget.cpp +++ b/src/plugins/terminal/terminalwidget.cpp @@ -137,13 +137,14 @@ void TerminalWidget::setupPty() { m_process = std::make_unique(); - Environment env = m_openParameters.environment.value_or(Environment::systemEnvironment()); - CommandLine shellCommand = m_openParameters.shellCommand.value_or( CommandLine{TerminalSettings::instance().shell.filePath(), TerminalSettings::instance().shellArguments.value(), CommandLine::Raw}); + Environment env = m_openParameters.environment.value_or( + shellCommand.executable().deviceEnvironment()); + // For git bash on Windows env.prependOrSetPath(shellCommand.executable().parentDir()); if (env.hasKey("CLINK_NOAUTORUN"))