Skip to content

Commit 4163db4

Browse files
committed
blasting CI
1 parent 437b602 commit 4163db4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cwltool/job.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,22 @@ def relink_initialworkdir(
102102
| stat.S_IWGRP
103103
| stat.S_IWOTH
104104
)
105+
mode = 0o664 # Doesn't work for my code
106+
mode = 0o777 # works for my code
105107
if os.path.islink(host_outdir_tgt) or os.path.isfile(host_outdir_tgt):
106-
os.chmod(host_outdir_tgt, mode)
107-
os.remove(host_outdir_tgt)
108+
try:
109+
os.chmod(host_outdir_tgt, mode)
110+
os.remove(host_outdir_tgt)
111+
except PermissionError:
112+
pass
108113
elif os.path.isdir(host_outdir_tgt) and not vol.resolved.startswith("_:"):
109114
os.chmod(host_outdir_tgt, mode)
110115
shutil.rmtree(host_outdir_tgt)
111116
if not vol.resolved.startswith("_:"):
112-
os.symlink(vol.resolved, host_outdir_tgt)
117+
try:
118+
os.symlink(vol.resolved, host_outdir_tgt)
119+
except FileExistsError:
120+
pass
113121

114122

115123
def neverquote(string: str, pos: int = 0, endpos: int = 0) -> Optional[Match[str]]:

0 commit comments

Comments
 (0)