Skip to content

Commit

Permalink
fix initial run
Browse files Browse the repository at this point in the history
  • Loading branch information
millsp committed May 25, 2023
1 parent 561b7d0 commit ea7b833
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/vscode/src/plugins/prisma-language-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ const startFileWatcher = (rootPath: string) => {
return false
}

// but every time we hit a node_module path, ensure some sub-paths are whitelisted
if (fs.statSync(targetPath).isDirectory() && targetPath.endsWith('node_modules')) {
// but every time we hit a project path, we ensure some sub-paths are whitelisted
if (fs.statSync(targetPath).isDirectory()) {
try {
// we get the location of installation of the @prisma/client package
const clientPath = path.dirname(require.resolve('@prisma/client', { paths: [targetPath] }))
Expand All @@ -124,10 +124,7 @@ const startFileWatcher = (rootPath: string) => {
}
}

// if the path is in the allowed paths then we don't ignore it
if (targetPath in allowedWatcherPaths) {
return false
}
if (targetPath in allowedWatcherPaths) return false

return true
},
Expand Down

0 comments on commit ea7b833

Please sign in to comment.