packages/cli: use fs.readJson

This commit is contained in:
Patrik Oldsberg
2020-06-03 14:37:45 +02:00
parent 832ac05a90
commit 70c442e8f3
+1 -2
View File
@@ -57,8 +57,7 @@ export function findRootPath(topPath: string): string {
const exists = fs.pathExistsSync(packagePath);
if (exists) {
try {
const contents = fs.readFileSync(packagePath, 'utf8');
const data = JSON.parse(contents);
const data = fs.readJsonSync(packagePath);
if (data.name === 'root' || data.name.includes('backstage-e2e')) {
return path;
}