From e897b3e2678031759503fabb54f36dc0e845b887 Mon Sep 17 00:00:00 2001 From: FrozenPandaz Date: Mon, 26 Jun 2023 16:58:41 -0400 Subject: [PATCH] fix(misc): nx view-logs should open the nx-cloud link when connected to cloud --- packages/nx/src/command-line/connect/view-logs.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/nx/src/command-line/connect/view-logs.ts b/packages/nx/src/command-line/connect/view-logs.ts index c72d628213ff95..74ad8646061826 100644 --- a/packages/nx/src/command-line/connect/view-logs.ts +++ b/packages/nx/src/command-line/connect/view-logs.ts @@ -6,7 +6,16 @@ import { runNxSync } from '../../utils/child-process'; export async function viewLogs(): Promise { const pmc = getPackageManagerCommand(); - const cloudUsed = isNxCloudUsed() && false; + const cloudUsed = isNxCloudUsed(); + if (cloudUsed) { + output.error({ + title: 'Your workspace is already connected to Nx Cloud', + bodyLines: [ + `Refer to the output of the last command to find the Nx Cloud link to view the run details.`, + ], + }); + return 1; + } if (!cloudUsed) { const installCloud = await ( await import('enquirer')