Skip to content

Commit

Permalink
added PermissionError
Browse files Browse the repository at this point in the history
  • Loading branch information
jfennick committed Aug 17, 2023
1 parent 433313c commit c7548a6
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

Check warning on line 108 in cwltool/job.py

View check run for this annotation

Codecov / codecov/patch

cwltool/job.py#L104-L108

Added lines #L104 - L108 were not covered by tests
if not vol.resolved.startswith("_:"):
try:
os.symlink(vol.resolved, host_outdir_tgt)
Expand Down

0 comments on commit c7548a6

Please sign in to comment.