Skip to content

Commit

Permalink
fix: don't take in account just directory app without package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Jul 31, 2016
1 parent da700d4 commit 3418239
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ export async function computeDefaultAppDirectory(projectDir: string, userAppDir:
}

for (let dir of DEFAULT_APP_DIR_NAMES) {
const absolutePath = path.join(projectDir, dir)
const absolutePath = path.join(projectDir, dir, "package.json")
const stat = await statOrNull(absolutePath)
if (stat != null && stat.isDirectory()) {
if (stat != null && stat.isFile()) {
return absolutePath
}
}
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/test-app-one/app/package.json/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ignore `package.json` directory.
1 change: 1 addition & 0 deletions test/fixtures/test-app-one/app/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test that we don't take in account just directory `app` without `package.json`

0 comments on commit 3418239

Please sign in to comment.