Skip to content

Commit 3418239

Browse files
committed
fix: don't take in account just directory app without package.json
1 parent da700d4 commit 3418239

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/util/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ export async function computeDefaultAppDirectory(projectDir: string, userAppDir:
204204
}
205205

206206
for (let dir of DEFAULT_APP_DIR_NAMES) {
207-
const absolutePath = path.join(projectDir, dir)
207+
const absolutePath = path.join(projectDir, dir, "package.json")
208208
const stat = await statOrNull(absolutePath)
209-
if (stat != null && stat.isDirectory()) {
209+
if (stat != null && stat.isFile()) {
210210
return absolutePath
211211
}
212212
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ignore `package.json` directory.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test that we don't take in account just directory `app` without `package.json`

0 commit comments

Comments
 (0)