mirror of
https://github.com/feder-cr/invisible_playwright.git
synced 2026-06-07 08:35:12 +02:00
fix(download): strip *-prefix from sha256sum filenames (#15)
sha256sum binary-mode output prefixes filenames with `*` and the parser was using parts[-1] verbatim, so checksum lookups by bare filename returned None and the wrapper raised RuntimeError instead of installing the binary. Thanks LostBoxArt.
This commit is contained in:
parent
567717dfd7
commit
1eb3d5f55a
1 changed files with 3 additions and 1 deletions
|
|
@ -96,7 +96,9 @@ def _parse_checksums(text: str) -> dict[str, str]:
|
|||
continue
|
||||
parts = line.split()
|
||||
if len(parts) >= 2:
|
||||
out[parts[-1]] = parts[0]
|
||||
# sha256sum uses ' *' or ' ' prefix for binary vs text mode
|
||||
key = parts[-1].lstrip("*")
|
||||
out[key] = parts[0]
|
||||
return out
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue