aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/externaltool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/coreplugin/externaltool.cpp')
-rw-r--r--src/plugins/coreplugin/externaltool.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/externaltool.cpp b/src/plugins/coreplugin/externaltool.cpp
index 58abcae5b1..08e3ecc29b 100644
--- a/src/plugins/coreplugin/externaltool.cpp
+++ b/src/plugins/coreplugin/externaltool.cpp
@@ -35,6 +35,7 @@
#include <app/app_version.h>
+#include <utils/algorithm.h>
#include <utils/fileutils.h>
#include <utils/macroexpander.h>
#include <utils/qtcassert.h>
@@ -574,7 +575,11 @@ bool ExternalToolRunner::resolve()
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