mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 02:56:31 +00:00
Fix submodules - check if it is needed or not (#2426)
This commit is contained in:
parent
01a6e074a5
commit
3e9de0c210
@ -160,17 +160,18 @@ class GitRepo(CoreSysAttributes):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Update submodules
|
# Update submodules
|
||||||
await self.sys_run_in_executor(
|
if len(self.repo.submodules) > 0:
|
||||||
ft.partial(
|
await self.sys_run_in_executor(
|
||||||
self.repo.git.submodule.root.update,
|
ft.partial(
|
||||||
**{
|
self.repo.git.submodule.root.update,
|
||||||
"recursive": False,
|
**{
|
||||||
"init": True,
|
"recursive": False,
|
||||||
"force_remove": True,
|
"init": True,
|
||||||
"force_reset": True,
|
"force_remove": True,
|
||||||
},
|
"force_reset": True,
|
||||||
|
},
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
# Cleanup old data
|
# Cleanup old data
|
||||||
await self.sys_run_in_executor(ft.partial(self.repo.git.clean, "-xdf"))
|
await self.sys_run_in_executor(ft.partial(self.repo.git.clean, "-xdf"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user