chore: remove unused plugin cache assignments (#2446)

This commit is contained in:
JATMN
2026-10-27 07:53:33 -07:00
committed by GitHub
parent 443dbea52a
commit e097dc8864
3 changed files with 2 additions and 8 deletions
+1 -4
View File
@@ -1186,12 +1186,11 @@ export async function migrateFromEnabledPlugins(): Promise<void> {
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<void> {
continue
}
installPath = pluginCachePath
// Only read manifest if the .claude-plugin dir is present
if (dirEntries.includes('.claude-plugin')) {
version = getPluginVersionFromManifest(pluginCachePath, pluginId)
-1
View File
@@ -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(
+1 -3
View File
@@ -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}`)