Skip to content

Commit 8a72be5

Browse files
committed
fix: don't show the error log when can't find installed stdlib
1 parent c775d6f commit 8a72be5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/schema/src/language-server/zmodel-workspace-manager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class ZModelWorkspaceManager extends DefaultWorkspaceManager {
2424
// in the project's node_modules
2525
let installedStdlibPath: string | undefined;
2626
for (const folder of _folders) {
27-
const folderPath = URI.parse(folder.uri).fsPath;
27+
const folderPath = this.getRootFolder(folder).fsPath;
2828
try {
2929
// Try to resolve zenstack from the workspace folder
3030
const languagePackagePath = require.resolve('zenstack/package.json', {
@@ -41,7 +41,6 @@ export class ZModelWorkspaceManager extends DefaultWorkspaceManager {
4141
}
4242
} catch (error) {
4343
// Package not found or other error, continue to next folder
44-
console.error(`error happen when trying to find stdlib in folder ${folder.uri}:`, error);
4544
continue;
4645
}
4746
}

0 commit comments

Comments
 (0)