Skip to content

Commit

Permalink
gui: check for package.json in project root (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys authored Nov 4, 2024
1 parent 357f45a commit e7be333
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vlt/src/read-project-folders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export const readProjectFolders = (
// if the given directory is also the project root, we then
// proceed to read its siblings instead
let cwd = scurry.resolve(dir)
if (cwd.startsWith(projectRoot)) {
if (
cwd.startsWith(projectRoot) &&
scurry.lstatSync(scurry.resolve(projectRoot, 'package.json'))
) {
dir = scurry.resolve(projectRoot, '..')
cwd = scurry.resolve(dir)
}
Expand Down

0 comments on commit e7be333

Please sign in to comment.