Skip to content

Commit

Permalink
added PermissionError
Browse files Browse the repository at this point in the history
  • Loading branch information
jfennick authored and mr-c committed Dec 5, 2023
1 parent f5a7412 commit 83b0882
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 @@ -106,8 +106,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 113 in cwltool/job.py

View check run for this annotation

Codecov / codecov/patch

cwltool/job.py#L109-L113

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

0 comments on commit 83b0882

Please sign in to comment.