diff --git a/src/wic/api/pythonapi.py b/src/wic/api/pythonapi.py index 9ccf7899..fd396455 100644 --- a/src/wic/api/pythonapi.py +++ b/src/wic/api/pythonapi.py @@ -585,6 +585,7 @@ def write_ast_to_disk(self, directory: Path) -> None: yaml_contents = {"inputs": inputs, "steps": steps} if inputs else {"steps": steps} # NOTE: For various reasons, process_name should be globally unique. # In this case, it is to avoid overwriting files. + directory.mkdir(exist_ok=True, parents=True) with open(str(directory / self.process_name) + '.wic', mode='w', encoding='utf-8') as f: f.write(yaml.dump(yaml_contents, sort_keys=False, line_break='\n', indent=2)) @@ -755,7 +756,7 @@ def run(self) -> None: input_output.write_to_disk(rose_tree, Path('autogenerated/'), True, args.inputs_file) # Do NOT capture stdout and/or stderr and pipe warnings and errors into a black hole. - retval = run_local_module.run_local(args, rose_tree, args.cachedir, 'cwltool', False) + retval = run_local_module.run_local(args, rose_tree, args.cachedir, 'cwltool', True) # Finally, since there is an output file copying bug in cwltool, # we need to copy the output files manually. See comment above.