Skip to content

Commit 2744d2e

Browse files
author
Peter Amstutz
committed
Add runtime.exitCode to outputEval
1 parent bffea7f commit 2744d2e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cwltool/command_line_tool.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,12 +592,14 @@ def collect_output_ports(self,
592592
ports, # type: Set[Dict[Text, Any]]
593593
builder, # type: Builder
594594
outdir, # type: Text
595+
rcode, # type: int
595596
compute_checksum=True, # type: bool
596597
jobname="", # type: Text
597598
readers=None # type: Dict[Text, Any]
598599
): # type: (...) -> OutputPorts
599600
ret = {} # type: OutputPorts
600601
debug = _logger.isEnabledFor(logging.DEBUG)
602+
builder.resources["exitCode"] = rcode
601603
try:
602604
fs_access = builder.make_fs_access(outdir)
603605
custom_output = fs_access.join(outdir, "cwl.output.json")

cwltool/job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def _execute(self,
328328
self.generatemapper, self.outdir, self.builder.outdir,
329329
inplace_update=self.inplace_update)
330330

331-
outputs = self.collect_outputs(self.outdir)
331+
outputs = self.collect_outputs(self.outdir, rcode)
332332
outputs = bytes2str_in_dicts(outputs) # type: ignore
333333
except OSError as e:
334334
if e.errno == 2:

0 commit comments

Comments
 (0)