Digital-Sapphire/PyUpdater

mac-arm not adding platform to config.pyu

ikhz opened this issue · 3 comments

ikhz commented

On mac arm64 pyupdater pkg -p doesnt add platform 'mac-arm' to config.pyu, it adds arm64 build into 'mac' plaform section

ikhz commented

invalid regex in core/package_handler/package.py parse_platform function

fix:
re_str = r"-(?P<platform>arm(64)?|mac(-arm)?|nix(64)?|win)-"

ikhz commented

also
name_regex = re.compile(r"(?P<name>[\w -]+)-[arm|mac|nix|win]")
should not be so greedy because it grabs 'mac' if 'mac-arm' in the file name
fix:
name_regex = re.compile(r"(?P<name>[\w -]+?)-(arm|mac|nix|win)")

ikhz commented

also in client/updates.py _overwrite and _restart
if get_system() == "mac": should be changed to if "mac" in get_system(): because platform is 'mac-arm'