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 @@ -248,7 +248,9 @@ def add_file_or_directory_volume(
248
248
"""Append volume a file/dir mapping to the runtime option list."""
249
249
if not volume .resolved .startswith ("_:" ):
250
250
_check_docker_machine_path (volume .resolved )
251
- self .append_volume (runtime , volume .resolved , volume .target )
251
+ self .append_volume (
252
+ runtime , volume .resolved , volume .target , writable = volume .staged
253
+ )
252
254
253
255
def add_writable_file_volume (
254
256
self ,
Original file line number Diff line number Diff line change @@ -95,18 +95,13 @@ def relink_initialworkdir(
95
95
continue
96
96
host_outdir_tgt = os .path .join (host_outdir , vol .target [len (container_outdir ) + 1 :])
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