Skip to content

Commit 8393fa2

Browse files
committed
added PermissionError
1 parent b968b42 commit 8393fa2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cwltool/job.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ def relink_initialworkdir(
100100
pass
101101
elif os.path.isdir(host_outdir_tgt) and not vol.resolved.startswith("_:"):
102102
ensure_writable(host_outdir_tgt, include_root=True)
103-
shutil.rmtree(host_outdir_tgt)
103+
try:
104+
shutil.rmtree(host_outdir_tgt)
105+
except PermissionError:
106+
pass
104107
if not vol.resolved.startswith("_:"):
105108
try:
106109
os.symlink(vol.resolved, host_outdir_tgt)

0 commit comments

Comments
 (0)