Repository navigation
Commit 670b9c7
committed
fix(ai): silence the auto-update error from the bundled Claude Code
The bundled Claude Code ships inside Phoenix and is replaced when Phoenix
updates, so its own auto-updater has nothing useful to do — and it cannot
do it anyway: it resolves the npm prefix of whatever install it thinks it
is and tries to write there. It failed on every launch and said so in red
across the CLI pane ("Auto-update failed: no write permission to npm
prefix").
Set DISABLE_AUTOUPDATER for it, the supported way out (Anthropic set the
same var for their own managed runs). Keyed on the locator's `source`, so
a CLI the user installed keeps its updater: that copy is theirs to keep
current, and it is how their version eventually overtakes the bundled one.
Both spawn paths carry it — the CLI pane's PTY and the SDK query, which
runs the same executable. The SDK path now resolves through locateCli
directly for the source, retiring the findGlobalClaudeCli wrapper.
Also includes the `userInstalled` field on locate results, reporting that
the user has a Claude Code of their own even when the newer bundled copy
is the one that runs.1 parent d37d4fa commit 670b9c7
4 files changed
Lines changed: 55 additions & 26 deletions
File tree
- src-node
- test
- test/spec
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | 607 | | |
622 | 608 | | |
623 | 609 | | |
| |||
826 | 812 | | |
827 | 813 | | |
828 | 814 | | |
829 | | - | |
| 815 | + | |
830 | 816 | | |
831 | 817 | | |
832 | 818 | | |
| |||
2118 | 2104 | | |
2119 | 2105 | | |
2120 | 2106 | | |
2121 | | - | |
| 2107 | + | |
2122 | 2108 | | |
2123 | 2109 | | |
2124 | 2110 | | |
| |||
2214 | 2200 | | |
2215 | 2201 | | |
2216 | 2202 | | |
2217 | | - | |
2218 | | - | |
2219 | | - | |
2220 | | - | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
2221 | 2210 | | |
2222 | 2211 | | |
2223 | 2212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
783 | 803 | | |
784 | 804 | | |
785 | 805 | | |
| |||
789 | 809 | | |
790 | 810 | | |
791 | 811 | | |
792 | | - | |
| 812 | + | |
| 813 | + | |
793 | 814 | | |
| 815 | + | |
794 | 816 | | |
795 | 817 | | |
796 | | - | |
797 | | - | |
| 818 | + | |
| 819 | + | |
798 | 820 | | |
799 | 821 | | |
800 | 822 | | |
| |||
809 | 831 | | |
810 | 832 | | |
811 | 833 | | |
| 834 | + | |
812 | 835 | | |
813 | 836 | | |
814 | 837 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
38 | 55 | | |
39 | 56 | | |
40 | 57 | | |
| |||
0 commit comments