Make install procedure overwrite existing addons

However, back them up first and restore them if anything goes wrong
This commit is contained in:
Ellwood Zwovic
2017-07-12 20:07:20 -07:00
parent 4df177e397
commit 915c38c326
2 changed files with 65 additions and 13 deletions

View File

@@ -195,8 +195,10 @@ class BPKG_OT_install(SubprocMixin, bpy.types.Operator):
install_path = pathlib.Path(bpy.utils.user_resource('SCRIPTS', 'addons', create=True))
self.log.debug("Using %s as install path", install_path)
import addon_utils
proc = multiprocessing.Process(target=subproc.download_and_install,
args=(self.pipe_subproc, self.package_url, install_path))
args=(self.pipe_subproc, self.package_url, install_path, addon_utils.paths()))
return proc
def _subproc_progress(self, progress: subproc.Progress):