diff --git a/cwltool/draft2tool.py b/cwltool/draft2tool.py index 42f34c2dc..b80751b13 100644 --- a/cwltool/draft2tool.py +++ b/cwltool/draft2tool.py @@ -519,19 +519,14 @@ def collect_output_ports(self, ports, builder, outdir, compute_checksum=True, jo _logger.debug(u"Raw output from %s: %s", custom_output, json.dumps(ret, indent=4)) else: for i, port in enumerate(ports): - with SourceLine(ports, i, WorkflowException, debug): - fragment = shortname(port["id"]) - try: - ret[fragment] = self.collect_output(port, builder, outdir, fs_access, - compute_checksum=compute_checksum) - except Exception as e: - _logger.debug( - u"Error collecting output for parameter '%s'" - % shortname(port["id"]), exc_info=True) - raise WorkflowException( + def makeWorkflowException(msg): + return WorkflowException( u"Error collecting output for parameter '%s':\n%s" - % (shortname(port["id"]), indent(u(str(e))))) - + % (shortname(port["id"]), msg)) + with SourceLine(ports, i, makeWorkflowException, debug): + fragment = shortname(port["id"]) + ret[fragment] = self.collect_output(port, builder, outdir, fs_access, + compute_checksum=compute_checksum) if ret: revmap = partial(revmap_file, builder, outdir) adjustDirObjs(ret, trim_listing) diff --git a/cwltool/expression.py b/cwltool/expression.py index 162b3d2ad..19606ba8e 100644 --- a/cwltool/expression.py +++ b/cwltool/expression.py @@ -214,7 +214,7 @@ def do_eval(ex, jobinput, requirements, outdir, tmpdir, resources, u"self": context, u"runtime": runtime} - if isinstance(ex, (str, Text)): + if isinstance(ex, (str, Text)) and ("$(" in ex or "${" in ex): fullJS = False jslib = u"" for r in reversed(requirements):