Wait for git process to finish

Bump to 1.2.2
This commit is contained in:
tretrauit 2022-02-18 20:18:24 +07:00
parent 4359a43771
commit a481e529b6
No known key found for this signature in database
GPG Key ID: 862760FF1903319E
2 changed files with 5 additions and 3 deletions

View File

@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text()
setup(
name='worthless',
version='1.2.1',
version='1.2.2',
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
url='https://git.froggi.es/tretrauit/worthless-launcher',
license='MIT License',

View File

@ -62,9 +62,11 @@ class Patcher:
if shutil.which("git"):
if not self._patch_path.exists() or not self._patch_path.is_dir() \
or not self._patch_path.joinpath(".git").exists():
await asyncio.create_subprocess_exec("git", "clone", self._patch_url, str(self._patch_path))
proc = await asyncio.create_subprocess_exec("git", "clone", self._patch_url, str(self._patch_path))
await proc.wait()
else:
await asyncio.create_subprocess_exec("git", "pull", cwd=str(self._patch_path))
proc = await asyncio.create_subprocess_exec("git", "pull", cwd=str(self._patch_path))
await proc.wait()
else:
archive = await self._get_git_archive()
if not archive: