forked from qt-creator/qt-creator
Expand variables in external tool environment
Change-Id: I98fc942f25309bba1b4573b0544418d3b4b836c8 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include <app/app_version.h>
|
#include <app/app_version.h>
|
||||||
|
|
||||||
|
#include <utils/algorithm.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <utils/macroexpander.h>
|
#include <utils/macroexpander.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -574,7 +575,11 @@ bool ExternalToolRunner::resolve()
|
|||||||
|
|
||||||
|
|
||||||
MacroExpander *expander = globalMacroExpander();
|
MacroExpander *expander = globalMacroExpander();
|
||||||
m_resolvedEnvironment.modify(m_tool->environment());
|
QList<EnvironmentItem> expandedEnvironment
|
||||||
|
= Utils::transform(m_tool->environment(), [expander](const EnvironmentItem &item) {
|
||||||
|
return EnvironmentItem(item.name, expander->expand(item.value), item.operation);
|
||||||
|
});
|
||||||
|
m_resolvedEnvironment.modify(expandedEnvironment);
|
||||||
|
|
||||||
{
|
{
|
||||||
// executable
|
// executable
|
||||||
|
Reference in New Issue
Block a user