git_deploy: fix install script parsing

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-06-08 06:13:17 -04:00
parent 3b76d81155
commit 250b93e89c
No known key found for this signature in database
GPG Key ID: 7027245FBBDDF59A
1 changed files with 5 additions and 2 deletions

View File

@ -197,8 +197,11 @@ class GitDeploy(AppDeploy):
return None return None
event_loop = self.server.get_event_loop() event_loop = self.server.get_event_loop()
data = await event_loop.run_in_thread(inst_path.read_text) data = await event_loop.run_in_thread(inst_path.read_text)
packages: List[str] = re.findall(r'PKGLIST="(.*)"', data) plines: List[str] = re.findall(r'PKGLIST="(.*)"', data)
packages = [p.lstrip("${PKGLIST}").strip() for p in packages] plines = [p.lstrip("${PKGLIST}").strip() for p in plines]
packages: List[str] = []
for line in plines:
packages.extend(line.split())
if not packages: if not packages:
self.log_info(f"No packages found in script: {inst_path}") self.log_info(f"No packages found in script: {inst_path}")
return None return None