mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-21 08:06:30 +00:00
Fix submodule update (#2434)
This commit is contained in:
parent
560e04c64a
commit
e1068997ea
@ -33,6 +33,10 @@ class GitRepo(CoreSysAttributes):
|
||||
|
||||
self.data: Dict[str, str] = RE_REPOSITORY.match(url).groupdict()
|
||||
|
||||
def __repr__(self) -> str:
|
||||
"""Return internal representation."""
|
||||
return f"<Git: {self.path!s}>"
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Return repository URL."""
|
||||
@ -160,15 +164,13 @@ class GitRepo(CoreSysAttributes):
|
||||
)
|
||||
|
||||
# Update submodules
|
||||
if len(self.repo.submodules) > 0:
|
||||
for submodule in self.repo.submodules:
|
||||
await self.sys_run_in_executor(
|
||||
ft.partial(
|
||||
self.repo.git.submodule.root.update,
|
||||
submodule.update,
|
||||
**{
|
||||
"recursive": False,
|
||||
"init": True,
|
||||
"force_remove": True,
|
||||
"force_reset": True,
|
||||
},
|
||||
)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user