Skip to content

Commit

Permalink
added PermissionError
Browse files Browse the repository at this point in the history
  • Loading branch information
jfennick committed May 30, 2023
1 parent 7e49000 commit 077747c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cwltool/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ def relink_initialworkdir(
except PermissionError:
pass
elif os.path.isdir(host_outdir_tgt) and not vol.resolved.startswith("_:"):
ensure_writable(host_outdir_tgt, include_root=True)
shutil.rmtree(host_outdir_tgt)
try:
ensure_writable(host_outdir_tgt, include_root=True)
shutil.rmtree(host_outdir_tgt)
except PermissionError:
pass
if not vol.resolved.startswith("_:"):
try:
os.symlink(vol.resolved, host_outdir_tgt)
Expand Down

0 comments on commit 077747c

Please sign in to comment.