Skip to content

Commit 1c2cb94

Browse files
Agent F46B0548A3AAclaude
andcommitted
Fix: Respect plugin defaultChoice for stable/beta channels
Addressed Greptile review feedback: The previous logic forced "npm" for stable/beta update channels, ignoring the plugin's defaultChoice. This caused 404 errors for unpublished plugins even after setting defaultChoice to "local" in their package.json. Now stable/beta channels respect the plugin's defaultChoice setting: - If defaultChoice is "local", use bundled version (if available) - Otherwise default to "npm" (existing behavior for published plugins) This ensures unpublished plugins (googlechat, mattermost, line, tlon) work correctly during setup regardless of the user's update channel. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent df9bdfa commit 1c2cb94

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/commands/onboarding/plugin-install.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,21 @@ function resolveInstallDefaultChoice(params: {
109109
}): InstallChoice {
110110
const { cfg, entry, localPath } = params;
111111
const updateChannel = cfg.update?.channel;
112-
if (updateChannel === "dev") {
113-
return localPath ? "local" : "npm";
114-
}
112+
const entryDefault = entry.install.defaultChoice;
113+
114+
// For stable/beta channels, respect the plugin's defaultChoice
115+
// This allows unpublished plugins to default to "local"
115116
if (updateChannel === "stable" || updateChannel === "beta") {
117+
if (entryDefault === "local") {
118+
return localPath ? "local" : "npm";
119+
}
116120
return "npm";
117121
}
118-
const entryDefault = entry.install.defaultChoice;
122+
123+
if (updateChannel === "dev") {
124+
return localPath ? "local" : "npm";
125+
}
126+
119127
if (entryDefault === "local") {
120128
return localPath ? "local" : "npm";
121129
}

0 commit comments

Comments
 (0)