Skip to content

Commit 36bad2c

Browse files
committed
blasting CI
1 parent 1c24e9c commit 36bad2c

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
@@ -100,14 +100,22 @@ def relink_initialworkdir(
100100
| stat.S_IWGRP
101101
| stat.S_IWOTH
102102
)
103+
mode = 0o664 # Doesn't work for my code
104+
mode = 0o777 # works for my code
103105
if os.path.islink(host_outdir_tgt) or os.path.isfile(host_outdir_tgt):
104-
os.chmod(host_outdir_tgt, mode)
105-
os.remove(host_outdir_tgt)
106+
try:
107+
os.chmod(host_outdir_tgt, mode)
108+
os.remove(host_outdir_tgt)
109+
except PermissionError:
110+
pass
106111
elif os.path.isdir(host_outdir_tgt) and not vol.resolved.startswith("_:"):
107112
os.chmod(host_outdir_tgt, mode)
108113
shutil.rmtree(host_outdir_tgt)
109114
if not vol.resolved.startswith("_:"):
110-
os.symlink(vol.resolved, host_outdir_tgt)
115+
try:
116+
os.symlink(vol.resolved, host_outdir_tgt)
117+
except FileExistsError:
118+
pass
111119

112120

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

0 commit comments

Comments
 (0)