diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index ff24a451eae..e5ee2c7dc72 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -753,8 +753,10 @@ class Tool(Dictifiable): mod = __import__(module, globals(), locals(), [cls]) self.tool_action = getattr(mod, cls)() if getattr(self.tool_action, "requires_js_runtime", False): - if expressions.find_engine(self.app.config) is None: - message = REQUIRES_JS_RUNTIME_MESSAGE % self.tool_id + try: + expressions.find_engine(self.app.config) + except Exception: + message = REQUIRES_JS_RUNTIME_MESSAGE % self.tool_id or self.tool_uuid raise Exception(message) # Tests self.__parse_tests(tool_source) diff --git a/lib/galaxy/tools/expressions/util.py b/lib/galaxy/tools/expressions/util.py index 93531186fc9..082ed3c916f 100644 --- a/lib/galaxy/tools/expressions/util.py +++ b/lib/galaxy/tools/expressions/util.py @@ -5,4 +5,6 @@ def find_engine(config): nodejs_path = getattr(config, "nodejs_path", None) if nodejs_path is None: nodejs_path = which("nodejs") or which("node") or None + if nodejs_path is None: + raise Exception("nodejs or node not found on PATH") return nodejs_path