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:
Marcus Tillmanns
2023-03-28 14:48:58 +02:00
parent f1f5a7412a
commit b999e5700e
2 changed files with 5 additions and 3 deletions

View File

@@ -137,13 +137,14 @@ void TerminalWidget::setupPty()
{
m_process = std::make_unique<QtcProcess>();
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"))