mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-22 16:46:29 +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()
|
self.data: Dict[str, str] = RE_REPOSITORY.match(url).groupdict()
|
||||||
|
|
||||||
|
def __repr__(self) -> str:
|
||||||
|
"""Return internal representation."""
|
||||||
|
return f"<Git: {self.path!s}>"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def url(self) -> str:
|
def url(self) -> str:
|
||||||
"""Return repository URL."""
|
"""Return repository URL."""
|
||||||
@ -160,15 +164,13 @@ class GitRepo(CoreSysAttributes):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Update submodules
|
# Update submodules
|
||||||
if len(self.repo.submodules) > 0:
|
for submodule in self.repo.submodules:
|
||||||
await self.sys_run_in_executor(
|
await self.sys_run_in_executor(
|
||||||
ft.partial(
|
ft.partial(
|
||||||
self.repo.git.submodule.root.update,
|
submodule.update,
|
||||||
**{
|
**{
|
||||||
"recursive": False,
|
"recursive": False,
|
||||||
"init": True,
|
"init": True,
|
||||||
"force_remove": True,
|
|
||||||
"force_reset": True,
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user