fix(config): isolate plugin list reads from a broken JSONC layer
Plugin listing still called readConfigFile per layer, so one unparseable project file made GET /api/config/plugins and VS Code listPluginEntries fail. Reuse readConfigLayer isolation and pin comment-only empty parse in the VS Code suite. Co-authored-by: serkraser <serkraser@gmail.com>
This commit is contained in:
co-authored by
serkraser
parent
8b086343fd
commit
6751c7dc7a
@@ -926,10 +926,10 @@ const getPluginConfigSources = (workingDirectory?: string | null): Array<{ scope
|
||||
const projectPath = getProjectConfigPath(workingDirectory || undefined);
|
||||
return [
|
||||
customPath
|
||||
? { scope: 'user', path: customPath, config: readConfigFile(customPath) }
|
||||
: { scope: 'user', path: userPath, config: readConfigFile(userPath) },
|
||||
? { scope: 'user', path: customPath, config: readConfigLayer(customPath).config }
|
||||
: { scope: 'user', path: userPath, config: readConfigLayer(userPath).config },
|
||||
...(projectPath
|
||||
? [{ scope: 'project' as const, path: projectPath, config: readConfigFile(projectPath) }]
|
||||
? [{ scope: 'project' as const, path: projectPath, config: readConfigLayer(projectPath).config }]
|
||||
: []),
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user