@@ -265,7 +265,6 @@ def _execute(self,
265
265
else :
266
266
stdin_path = rmap [1 ]
267
267
268
-
269
268
stderr_path = None
270
269
if self .stderr is not None :
271
270
abserr = os .path .join (self .outdir , self .stderr )
@@ -481,7 +480,7 @@ def create_file_and_add_volume(self,
481
480
volume , # type: MapperEnt
482
481
host_outdir_tgt , # type: Optional[Text]
483
482
secret_store # type: Optional[SecretStore]
484
- ): # type: (...) -> None
483
+ ): # type: (...) -> Optional[Text]
485
484
"""Create the file and add a mapping."""
486
485
if not host_outdir_tgt :
487
486
new_file = os .path .join (
@@ -504,6 +503,7 @@ def create_file_and_add_volume(self,
504
503
ensure_writable (host_outdir_tgt or new_file )
505
504
else :
506
505
ensure_non_writable (host_outdir_tgt or new_file )
506
+ return host_outdir_tgt or new_file
507
507
508
508
509
509
@@ -535,8 +535,12 @@ def add_volumes(self,
535
535
self .add_writable_directory_volume (
536
536
runtime , vol , host_outdir_tgt )
537
537
elif vol .type in ["CreateFile" , "CreateWritableFile" ]:
538
- self .create_file_and_add_volume (
538
+ new_path = self .create_file_and_add_volume (
539
539
runtime , vol , host_outdir_tgt , secret_store )
540
+ key = pathmapper .reversemap (vol .target )
541
+ if key :
542
+ pathmapper .update (
543
+ key [0 ], new_path , vol .target , vol .type , vol .staged )
540
544
541
545
def run (self , runtimeContext ):
542
546
# type: (RuntimeContext) -> None
0 commit comments