fix: prevent nested .fusion/.fusion dir from PluginStore path bug
PluginStore's constructor treats its rootDir arg as a project root and internally appends `.fusion` before opening the SQLite DB. Several CLI call sites were passing the already-resolved `.fusion` directory, producing a doubled `.fusion/.fusion/fusion.db` that the dashboard process kept recreating on every project load. Pass the project root instead so the DB lands in the canonical `.fusion/fusion.db` alongside the rest of the project's state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -327,7 +327,7 @@ export async function runDaemon(opts: DaemonOptions = {}) {
|
||||
}
|
||||
|
||||
// ── PluginStore: plugin installation management ─────────────────────
|
||||
const pluginStore = new PluginStore(store.getFusionDir());
|
||||
const pluginStore = new PluginStore(store.getRootDir());
|
||||
await pluginStore.init();
|
||||
|
||||
// ── PluginLoader: plugin lifecycle management ───────────────────────
|
||||
|
||||
@@ -38,7 +38,7 @@ async function getProjectPath(projectName?: string): Promise<string> {
|
||||
*/
|
||||
async function createPluginStore(projectName?: string): Promise<PluginStore> {
|
||||
const projectPath = await getProjectPath(projectName);
|
||||
const pluginStore = new PluginStore(projectPath + "/.fusion");
|
||||
const pluginStore = new PluginStore(projectPath);
|
||||
await pluginStore.init();
|
||||
return pluginStore;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user