@@ -472,15 +472,15 @@ async def run_cwl_serialized_async(workflow: Json, basepath: str,
472472 pc .create_output_dirs (output_dirs , basepath )
473473 compiled_cwl = workflow_name + '.cwl'
474474 inputs_yml = workflow_name + '_inputs.yml'
475+ basepath = basepath .rstrip ("/" ) if basepath != "/" else basepath
475476 # write _input.yml file
476- with open (basepath / inputs_yml , 'w' , encoding = 'utf-8' ) as f :
477+ with open (Path ( basepath ) / inputs_yml , 'w' , encoding = 'utf-8' ) as f :
477478 yaml .dump (workflow ['yaml_inputs' ], f )
478479 workflow .pop ('retval' , None )
479480 workflow .pop ('yaml_inputs' , None )
480481 workflow .pop ('name' , None )
481- basepath = basepath .rstrip ("/" ) if basepath != "/" else basepath
482482 # write compiled .cwl file
483- with open (basepath / compiled_cwl , 'w' , encoding = 'utf-8' ) as f :
483+ with open (Path ( basepath ) / compiled_cwl , 'w' , encoding = 'utf-8' ) as f :
484484 yaml .dump (workflow , f )
485485 retval = run_cwl_workflow (workflow_name , basepath ,
486486 cwl_runner , container_cmd , False , env_commands = env_commands )
0 commit comments