From f5e40edb8353861e8fcaaea197c9c3b98d68057b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Wed, 23 Mar 2022 15:07:31 +0100 Subject: [PATCH] fix(core): fix missing versions from nx report (#9450) --- packages/workspace/src/command-line/report.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/workspace/src/command-line/report.ts b/packages/workspace/src/command-line/report.ts index dd7eb20bea395..e17fb5def9980 100644 --- a/packages/workspace/src/command-line/report.ts +++ b/packages/workspace/src/command-line/report.ts @@ -97,12 +97,8 @@ export function readPackageJson(p: string) { } } -export function readPackageVersion(p: string) { - let status = 'Not Found'; - try { - status = readPackageJson(p).version; - } catch {} - return status; +export function readPackageVersion(p: string): string { + return readPackageJson(p).version || 'Not Found'; } export function findInstalledCommunityPlugins(): {