mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-11-06 20:58:14 -04:00
chore: remove unused plugin cache assignments (#2446)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user