|
@@ -234,12 +234,18 @@ def install_module(system_name=None, module_name=None):
|
|
|
execute(['rm', '-Rf', module_path])
|
|
|
|
|
|
# 4. clone repo
|
|
|
- cloned = clone_repo(module_name, os.path.join(system_path, 'custom/addons'))
|
|
|
+ cloned = clone_repo(module_name, os.path.join(system_path, 'custom-addons'))
|
|
|
|
|
|
if not cloned:
|
|
|
return {'error': 'cannot clone repo'}
|
|
|
|
|
|
- # 5. start system container
|
|
|
+ # 5. remove git data
|
|
|
+ git_data_path = os.path.join(module_name, '.git')
|
|
|
+
|
|
|
+ if os.path.exists(git_data_path):
|
|
|
+ execute(['rm', '-Rf', git_data_path])
|
|
|
+
|
|
|
+ # 6. start system container
|
|
|
started = start_container(system_name)
|
|
|
|
|
|
if not started:
|