Skip to content

Commit f051198

Browse files
committed
Add mkdir
1 parent 7c6960b commit f051198

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cwltool/docker.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ def append_volume(runtime, source, target, writable=False):
236236
runtime.append(
237237
"--mount={}".format(mount_arg)
238238
)
239+
# Unlike "--volume", "--mount" will fail if the volume doesn't already exist.
240+
if not os.path.isdir(target):
241+
os.mkdir(target)
239242

240243
def add_file_or_directory_volume(
241244
self, runtime: List[str], volume: MapperEnt, host_outdir_tgt: Optional[str]

0 commit comments

Comments
 (0)