Git: Use new AddOn.dirs dictionary mapping instead of old list.
This commit is contained in:
parent
d08e0bebcc
commit
e4618876dc
|
@ -52,12 +52,13 @@ class Git(Provider):
|
||||||
@classmethod
|
@classmethod
|
||||||
def _pull(cls, addon: Addon) -> bool:
|
def _pull(cls, addon: Addon) -> bool:
|
||||||
logger.debug("Git pull %s", addon)
|
logger.debug("Git pull %s", addon)
|
||||||
head = cls._head(addon.dirs[0]) # git doesn't care which AddOn dir, as long as we're in the repo
|
path = next(iter(addon.dirs.values())) # git doesn't care which AddOn dir, as long as we're in the repo
|
||||||
|
head = cls._head(path)
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["git", "pull", "--quiet"],
|
["git", "pull", "--quiet"],
|
||||||
cwd=str(addon.dirs[0])
|
cwd=str(path)
|
||||||
)
|
)
|
||||||
return head != cls._head(addon.dirs[0])
|
return head != cls._head(path)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _head(cls, path: Path) -> bytes:
|
def _head(cls, path: Path) -> bytes:
|
||||||
|
|
Loading…
Reference in a new issue