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(
248248 """Append volume a file/dir mapping to the runtime option list."""
249249 if not volume .resolved .startswith ("_:" ):
250250 _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+ )
252254
253255 def add_writable_file_volume (
254256 self ,
Original file line number Diff line number Diff line change @@ -95,18 +95,13 @@ def relink_initialworkdir(
9595 continue
9696 host_outdir_tgt = os .path .join (host_outdir , vol .target [len (container_outdir ) + 1 :])
9797 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 )
102100 elif os .path .isdir (host_outdir_tgt ) and not vol .resolved .startswith ("_:" ):
101+ subprocess .run (["chmod" , "777" , host_outdir_tgt ], check = True )
103102 shutil .rmtree (host_outdir_tgt )
104103 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 )
110105
111106def neverquote (string : str , pos : int = 0 , endpos : int = 0 ) -> Optional [Match [str ]]:
112107 return None
You can’t perform that action at this time.
0 commit comments