File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,9 @@ def add_file_or_directory_volume(
261
261
"""Append volume a file/dir mapping to the runtime option list."""
262
262
if not volume .resolved .startswith ("_:" ):
263
263
_check_docker_machine_path (volume .resolved )
264
- self .append_volume (runtime , volume .resolved , volume .target )
264
+ self .append_volume (
265
+ runtime , volume .resolved , volume .target , writable = volume .staged
266
+ )
265
267
266
268
def add_writable_file_volume (
267
269
self ,
Original file line number Diff line number Diff line change @@ -95,18 +95,13 @@ def relink_initialworkdir(
95
95
host_outdir , vol .target [len (container_outdir ) + 1 :]
96
96
)
97
97
if os .path .islink (host_outdir_tgt ) or os .path .isfile (host_outdir_tgt ):
98
- try :
99
- os .remove (host_outdir_tgt )
100
- except PermissionError :
101
- pass
98
+ subprocess .run (["chmod" , "777" , host_outdir_tgt ], check = True )
99
+ os .remove (host_outdir_tgt )
102
100
elif os .path .isdir (host_outdir_tgt ) and not vol .resolved .startswith ("_:" ):
101
+ subprocess .run (["chmod" , "777" , host_outdir_tgt ], check = True )
103
102
shutil .rmtree (host_outdir_tgt )
104
103
if not vol .resolved .startswith ("_:" ):
105
- try :
106
- os .symlink (vol .resolved , host_outdir_tgt )
107
- except FileExistsError :
108
- pass
109
-
104
+ os .symlink (vol .resolved , host_outdir_tgt )
110
105
111
106
def neverquote (string : str , pos : int = 0 , endpos : int = 0 ) -> Optional [Match [str ]]:
112
107
return None
You can’t perform that action at this time.
0 commit comments