Skip to content

Commit

Permalink
auto-upgrader: change regex to match upgrade check
Browse files Browse the repository at this point in the history
output string for check-upgrade-status was changed on devtool
  • Loading branch information
thomas-roos committed Jan 9, 2024
1 parent df4f2be commit 4f909a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auto-upgrader/upgrader/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def check_for_updates(recipe: str) -> bool:


def _check_for_updates(recipe: str) -> Optional[dict]:
(_, stderr, _) = run(f"devtool check-upgrade-status {recipe}")
update_re = r"INFO:\s+" + recipe + r"\s+([^\s]+)\s+([^\s]+)"
m = re.search(update_re, stderr)
(_, stdout, _) = run(f"devtool check-upgrade-status {recipe}")
update_re = recipe + r"\s+([^\s]+)\s+([^\s]+)"
m = re.search(update_re, stdout)
if m:
logger.info(f"Update for {recipe}:\t{m.group(1)}\t->\t{m.group(2)}")
return {"recipe": recipe, "previous_version": m.group(1), "next_version": m.group(2)}
Expand Down

0 comments on commit 4f909a0

Please sign in to comment.