Skip to content

Commit

Permalink
Merge pull request #18259 from storybookjs/lifeiscontent-patch-1
Browse files Browse the repository at this point in the history
Core: Fix get-monorepo-type when no package.json at repo root
  • Loading branch information
shilman committed May 19, 2022
2 parents 27aaae8 + 0d21b96 commit 728b372
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/telemetry/src/get-monorepo-type.ts
Expand Up @@ -27,6 +27,8 @@ export const getMonorepoType = (): MonorepoType => {
if (monorepoType) {
return monorepoType;
}

if (!fs.existsSync(path.join(projectRootPath, 'package.json'))) return undefined;

const packageJson = fs.readJsonSync(path.join(projectRootPath, 'package.json')) as PackageJson;

Expand Down

0 comments on commit 728b372

Please sign in to comment.