forked from qt-creator/qt-creator
Utils::Environment: Use expanded values
The Environment class is supposed to support values with references to other variables, but we failed to actually expand them in most places. Fixes: QTCREATORBUG-22687 Change-Id: I108cb59d3b4571471423455240f6f4f1cf64bf05 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -59,8 +59,10 @@ QString QnxDeviceProcess::fullCommandLine(const Runnable &runnable) const
|
||||
fullCommandLine += QString::fromLatin1("cd %1 ; ").arg(QtcProcess::quoteArg(runnable.workingDirectory));
|
||||
|
||||
const Environment env = runnable.environment;
|
||||
for (auto it = env.constBegin(); it != env.constEnd(); ++it)
|
||||
fullCommandLine += QString::fromLatin1("%1='%2' ").arg(env.key(it)).arg(env.value(it));
|
||||
for (auto it = env.constBegin(); it != env.constEnd(); ++it) {
|
||||
fullCommandLine += QString::fromLatin1("%1='%2' ")
|
||||
.arg(env.key(it)).arg(env.expandedValueForKey(env.key(it)));
|
||||
}
|
||||
|
||||
fullCommandLine += QString::fromLatin1("%1 & echo $! > %2").arg(cmd).arg(m_pidFile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user