Skip to content

Commit 96cbaac

Browse files
committed
Fix for read only files
1 parent 942da6b commit 96cbaac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/pythainer/builders/cmds.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def get_str_for_dockerfile(
105105
if os.path.isfile(self._source_path):
106106
shutil.copyfile(self._source_path, docker_file_Path / self._source_path)
107107
elif os.path.isdir(self._source_path):
108+
shutil.rmtree(docker_file_Path / self._source_path)
108109
shutil.copytree(self._source_path, docker_file_Path / self._source_path,dirs_exist_ok=True)
109110
else:
110111
raise FileExistsError(f'{self._source_path} is not a valid target to copy into the docker container')

0 commit comments

Comments
 (0)