Skip to content

Commit 6bf7ca1

Browse files
committed
added PermissionError
1 parent 7b049e8 commit 6bf7ca1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cwltool/job.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ def relink_initialworkdir(
101101
except PermissionError:
102102
pass
103103
elif os.path.isdir(host_outdir_tgt) and not vol.resolved.startswith("_:"):
104-
ensure_writable(host_outdir_tgt, include_root=True)
105-
shutil.rmtree(host_outdir_tgt)
104+
try:
105+
ensure_writable(host_outdir_tgt, include_root=True)
106+
shutil.rmtree(host_outdir_tgt)
107+
except PermissionError:
108+
pass
106109
if not vol.resolved.startswith("_:"):
107110
try:
108111
os.symlink(vol.resolved, host_outdir_tgt)

0 commit comments

Comments
 (0)