Skip to content

Commit

Permalink
fix: untangling }
Browse files Browse the repository at this point in the history
  • Loading branch information
mosoriob committed Aug 11, 2021
1 parent d444d78 commit efa99b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/classes/localex/seed-execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ module.exports = async (job: any) => {
error = "Execution returned with non-zero status code";
}
else if (fs.existsSync(cwl_file)) {
//print the results
Object.values(results).map((result: any) => {
result.name = result.role
if (result.role in cwl_outputs){
if (result.role !== undefined && result.role in cwl_outputs) {
//assuming one result per output
let cwl_output = cwl_outputs[result.role];
let output_suffix_cwl = Md5.hashAsciiStr(seed.execution.modelid + plainargs.join());
let output_directory = outputdir + '/' + output_suffix_cwl;
Expand All @@ -231,6 +231,7 @@ module.exports = async (job: any) => {
}
let output_file = output_directory + '/' + cwl_output['basename'];
let tmpfile = cwl_output['path']
console.log("the temporal file " + tmpfile )
if (fs.existsSync(tmpfile)) {
fs.copyFileSync(tmpfile, output_file);
console.log("copy the outputs " + output_file )
Expand All @@ -244,7 +245,7 @@ module.exports = async (job: any) => {
}
}
}
});
);
// Set the results
seed.execution.results = results;
}
Expand Down

0 comments on commit efa99b7

Please # to comment.