File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -94,15 +94,22 @@ def relink_initialworkdir(
94
94
host_outdir_tgt = os .path .join (
95
95
host_outdir , vol .target [len (container_outdir ) + 1 :]
96
96
)
97
+ mode = (
98
+ os .stat (host_outdir_tgt ).st_mode
99
+ | stat .S_IWUSR
100
+ | stat .S_IWGRP
101
+ | stat .S_IWOTH
102
+ )
97
103
if os .path .islink (host_outdir_tgt ) or os .path .isfile (host_outdir_tgt ):
98
- subprocess . run ([ " chmod" , "777" , host_outdir_tgt ], check = True )
104
+ os . chmod ( host_outdir_tgt , mode )
99
105
os .remove (host_outdir_tgt )
100
106
elif os .path .isdir (host_outdir_tgt ) and not vol .resolved .startswith ("_:" ):
101
- subprocess . run ([ " chmod" , "777" , host_outdir_tgt ], check = True )
107
+ os . chmod ( host_outdir_tgt , mode )
102
108
shutil .rmtree (host_outdir_tgt )
103
109
if not vol .resolved .startswith ("_:" ):
104
110
os .symlink (vol .resolved , host_outdir_tgt )
105
111
112
+
106
113
def neverquote (string : str , pos : int = 0 , endpos : int = 0 ) -> Optional [Match [str ]]:
107
114
return None
108
115
You can’t perform that action at this time.
0 commit comments