File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff 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
120128def neverquote (string : str , pos : int = 0 , endpos : int = 0 ) -> Optional [Match [str ]]:
You can’t perform that action at this time.
0 commit comments