mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 01:56:34 +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
|
||||
await self.sys_run_in_executor(
|
||||
ft.partial(
|
||||
self.repo.git.submodule.root.update,
|
||||
**{
|
||||
"recursive": False,
|
||||
"init": True,
|
||||
"force_remove": True,
|
||||
"force_reset": True,
|
||||
},
|
||||
if len(self.repo.submodules) > 0:
|
||||
await self.sys_run_in_executor(
|
||||
ft.partial(
|
||||
self.repo.git.submodule.root.update,
|
||||
**{
|
||||
"recursive": False,
|
||||
"init": True,
|
||||
"force_remove": True,
|
||||
"force_reset": True,
|
||||
},
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
# Cleanup old data
|
||||
await self.sys_run_in_executor(ft.partial(self.repo.git.clean, "-xdf"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user