Skip to content

Commit 08bb056

Browse files
jfennickmr-c
authored andcommitted
blasting CI
1 parent 20e3eab commit 08bb056

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cwltool/job.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,22 @@ def relink_initialworkdir(
107107
| stat.S_IWGRP
108108
| stat.S_IWOTH
109109
)
110+
mode = 0o664 # Doesn't work for my code
111+
mode = 0o777 # works for my code
110112
if os.path.islink(host_outdir_tgt) or os.path.isfile(host_outdir_tgt):
111-
os.chmod(host_outdir_tgt, mode)
112-
os.remove(host_outdir_tgt)
113+
try:
114+
os.chmod(host_outdir_tgt, mode)
115+
os.remove(host_outdir_tgt)
116+
except PermissionError:
117+
pass
113118
elif os.path.isdir(host_outdir_tgt) and not vol.resolved.startswith("_:"):
114119
os.chmod(host_outdir_tgt, mode)
115120
shutil.rmtree(host_outdir_tgt)
116121
if not vol.resolved.startswith("_:"):
117-
os.symlink(vol.resolved, host_outdir_tgt)
122+
try:
123+
os.symlink(vol.resolved, host_outdir_tgt)
124+
except FileExistsError:
125+
pass
118126

119127

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

0 commit comments

Comments
 (0)