aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/api/runenvironment.cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-06-12 16:42:46 -0700
committerJake Petroules <jake.petroules@qt.io>2017-06-14 08:49:06 +0000
commit1f7db2a736be5f11cf762a745dd2b7ea12d2b657 (patch)
treee6d88da15190666d2b9137a9f14ab5f4263f820b /src/lib/corelib/api/runenvironment.cpp
parentb05e8a0082d1f8b425f6ddee2bc1a62726572642 (diff)
Fix nodejs/typescript probes when the Node interpreter is not in PATH
Change-Id: I9302a631450a43c25b5cf9bac6b5299f2b728683 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/api/runenvironment.cpp')
-rw-r--r--src/lib/corelib/api/runenvironment.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/corelib/api/runenvironment.cpp b/src/lib/corelib/api/runenvironment.cpp
index 4c4b4e681..c9095b708 100644
--- a/src/lib/corelib/api/runenvironment.cpp
+++ b/src/lib/corelib/api/runenvironment.cpp
@@ -280,11 +280,14 @@ int RunEnvironment::doRunTarget(const QString &targetBin, const QStringList &arg
}
if (completeSuffix == QLatin1String("js")) {
- // The Node.js binary is called nodejs on Debian/Ubuntu-family operating systems due to a
- // conflict with another package containing a binary named node
- targetExecutable = findExecutable(QStringList()
- << QLatin1String("nodejs")
- << QLatin1String("node"));
+ targetExecutable = d->resolvedProduct->moduleProperties->moduleProperty(
+ QLatin1String("nodejs"), QLatin1String("interpreterFilePath")).toString();
+ if (targetExecutable.isEmpty())
+ // The Node.js binary is called nodejs on Debian/Ubuntu-family operating systems due to
+ // conflict with another package containing a binary named node
+ targetExecutable = findExecutable(QStringList()
+ << QLatin1String("nodejs")
+ << QLatin1String("node"));
targetArguments.prepend(targetBin);
}