mirror of
https://github.com/aaddrick/claude-desktop-debian.git
synced 2026-05-17 00:26:21 +03:00
Moves run_doctor and its 9 internal helpers out of launcher-common.sh
(~670 lines) into their own scripts/doctor.sh. launcher-common.sh
now sources doctor.sh via a BASH_SOURCE-relative path, so any consumer
still gets the run_doctor entry point without needing to know about
the split.
Rationale: the testing / release-quality role concerns itself with
--doctor, and giving that subsystem its own file lets CODEOWNERS
scope it independently of the rest of launcher-common (display
detection, cleanup handlers, electron env) which remain in aaddrick's
domain.
Each packaging target now installs doctor.sh alongside launcher-common.sh:
scripts/packaging/appimage.sh → /usr/lib/claude-desktop/{launcher-common,doctor}.sh
scripts/packaging/deb.sh → /usr/lib/<pkg>/{launcher-common,doctor}.sh
scripts/packaging/rpm.sh → /usr/lib/<pkg>/{launcher-common,doctor}.sh
nix/claude-desktop.nix → $out/lib/claude-desktop/{launcher-common,doctor}.sh
Pure-move refactor. Function bodies byte-identical to the pre-split
launcher-common.sh content. Verified: `source launcher-common.sh` still
defines all 19 previous functions (9 launcher + 10 doctor); a live
run_doctor invocation produces the same output as before.
Co-Authored-By: Claude <claude@anthropic.com>