fix: filter existing paths for apispec in workspace (#7104)

This commit is contained in:
naman-bruno
2026-02-11 15:02:31 +05:30
committed by Bijin A B
parent 1f65387ea8
commit 0ba6c3d132

View File

@@ -211,15 +211,17 @@ const registerWorkspaceIpc = (mainWindow, workspaceWatcher) => {
const specs = workspaceConfig.specs || [];
const resolvedSpecs = specs.map((spec) => {
if (spec.path && !path.isAbsolute(spec.path)) {
return {
...spec,
path: path.join(workspacePath, spec.path)
};
}
return spec;
});
const resolvedSpecs = specs
.map((spec) => {
if (spec.path && !path.isAbsolute(spec.path)) {
return {
...spec,
path: path.join(workspacePath, spec.path)
};
}
return spec;
})
.filter((spec) => spec.path && fs.existsSync(spec.path));
return resolvedSpecs;
} catch (error) {