From 9168f09324d151ca45a076828ceec988f269cdbb Mon Sep 17 00:00:00 2001 From: Craigory Coppola Date: Fri, 21 Apr 2023 15:11:22 -0400 Subject: [PATCH] fix(core): hide message when migrating to a new major and already connected to cloud (#16466) (cherry picked from commit 505b5dc0048d4428cccd1700dfff79500a5ed763) --- packages/nx/src/command-line/migrate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nx/src/command-line/migrate.ts b/packages/nx/src/command-line/migrate.ts index b94fd8d6692471..8db88daf8073b0 100644 --- a/packages/nx/src/command-line/migrate.ts +++ b/packages/nx/src/command-line/migrate.ts @@ -57,6 +57,7 @@ import { getNxRequirePaths } from '../utils/installation-directory'; import { readNxJson } from '../config/configuration'; import { runNxSync } from '../utils/child-process'; import { daemonClient } from '../daemon/client/client'; +import { isNxCloudUsed } from '../utils/nx-cloud-utils'; export interface ResolvedMigrationConfiguration extends MigrationsJson { packageGroup?: ArrayPackageGroup; @@ -1169,7 +1170,8 @@ async function generateMigrationsJsonAndUpdatePackageJson( if ( ['nx', '@nrwl/workspace'].includes(opts.targetPackage) && (await isMigratingToNewMajor(from, opts.targetVersion)) && - !isCI() + !isCI() && + !isNxCloudUsed() ) { const useCloud = await connectToNxCloudCommand( messages.getPromptMessage('nxCloudMigration')