-
fix(cowork.sh): allow $ in minified identifier anchors; defensive lastIndexOf (#555)
发布于
2026-05-02 12:53:02 +00:00 Two regex anchors in patch_cowork_linux() used \w+ to capture minified
identifiers, but on Claude Desktop 1.5354.0 those identifiers contain $
(e.g. C$i, g$i). \w excludes $, so the inner captures never matched:- Patch 2b (vm: module assignment) silently no-op'd — no warning, no
failure. Build log went from "Applied 12" to "Applied 10". - Patch 6 step 2 (retry-delay auto-launch) emitted a warning but still
failed to apply.
Either way, the resulting app.asar shipped half-patched and Cowork
startup failed at runtime with "Swift VM addon not available".The fix widens both inner captures from \w+ to [\w$]+, matching the
existing precedent at scripts/patches/cowork.sh:482-501 (introduced in
PR #421 for the $e fs-reference rename in 1.3109.0). Also switches
Patch 6 from indexOf to lastIndexOf for the "VM service not running"
anchor — defensive against future versions reintroducing the string
outside the retry-loop site.Verified end-to-end on Fedora 43 / KDE Plasma 6 / Wayland: build log
shows "Applied 12 cowork patches"; daemon auto-launches at startup
with clean lifecycle (startup → listen → SIGTERM exit code=0).
Follow-ups tracked in #559.Resolves #558. Likely resolves #553 (named symptom) and #445 (daemon
never auto-spawned on Linux).Co-authored-by: Joost-Maker 66303669+Joost-Maker@users.noreply.github.com
Co-authored-by: HumboldtJoker 19808525+HumboldtJoker@users.noreply.github.com
Co-authored-by: zabka 3833286+zabka@users.noreply.github.com下载附件
- Patch 2b (vm: module assignment) silently no-op'd — no warning, no