From e097dc88648152181552cf2762fddf1fb5b5f49e Mon Sep 17 00:00:00 2001 From: JATMN Date: Tue, 27 Oct 2026 07:53:33 -0700 Subject: [PATCH] chore: remove unused plugin cache assignments (#2446) --- src/utils/plugins/installedPluginsManager.ts | 5 +---- src/utils/plugins/marketplaceManager.ts | 1 - src/utils/plugins/mcpbHandler.ts | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/utils/plugins/installedPluginsManager.ts b/src/utils/plugins/installedPluginsManager.ts index 31636364e..40db5cc48 100644 --- a/src/utils/plugins/installedPluginsManager.ts +++ b/src/utils/plugins/installedPluginsManager.ts @@ -1186,12 +1186,11 @@ export async function migrateFromEnabledPlugins(): Promise { const { entry, marketplaceInstallLocation } = pluginInfo - let installPath: string let version = 'unknown' let gitCommitSha: string | undefined = undefined if (typeof entry.source === 'string') { - installPath = join(marketplaceInstallLocation, entry.source) + const installPath = join(marketplaceInstallLocation, entry.source) version = getPluginVersionFromManifest(installPath, pluginId) gitCommitSha = await getGitCommitSha(installPath) } else { @@ -1218,8 +1217,6 @@ export async function migrateFromEnabledPlugins(): Promise { continue } - installPath = pluginCachePath - // Only read manifest if the .claude-plugin dir is present if (dirEntries.includes('.claude-plugin')) { version = getPluginVersionFromManifest(pluginCachePath, pluginId) diff --git a/src/utils/plugins/marketplaceManager.ts b/src/utils/plugins/marketplaceManager.ts index ed7f9d6fd..2eecccab4 100644 --- a/src/utils/plugins/marketplaceManager.ts +++ b/src/utils/plugins/marketplaceManager.ts @@ -1861,7 +1861,6 @@ async function loadAndCacheMarketplace( ) } } - cleanupNeeded = false // Clone is the live cache (renamed, copied, or kept) } catch (error) { const errorMsg = errorMessage(error) throw new Error( diff --git a/src/utils/plugins/mcpbHandler.ts b/src/utils/plugins/mcpbHandler.ts index d3c716ca8..c20fa6966 100644 --- a/src/utils/plugins/mcpbHandler.ts +++ b/src/utils/plugins/mcpbHandler.ts @@ -796,7 +796,6 @@ export async function loadMcpbFile( // Not cached or changed - need to download/load and extract let mcpbData: Uint8Array - let mcpbFilePath: string if (isUrl(source)) { // Download from URL @@ -804,7 +803,7 @@ export async function loadMcpbFile( .update(source) .digest('hex') .substring(0, 8) - mcpbFilePath = join(cacheDir, `${sourceHash}.mcpb`) + const mcpbFilePath = join(cacheDir, `${sourceHash}.mcpb`) mcpbData = await downloadMcpb(source, mcpbFilePath, onProgress) } else { // Load from local path @@ -816,7 +815,6 @@ export async function loadMcpbFile( try { mcpbData = await fs.readFileBytes(localPath) - mcpbFilePath = localPath } catch (error) { if (isENOENT(error)) { const err = new Error(`MCPB file not found: ${localPath}`)