Skip to content

Commit

Permalink
fix(core): hide message when migrating to a new major and already con…
Browse files Browse the repository at this point in the history
…nected to cloud
  • Loading branch information
AgentEnder committed Apr 21, 2023
1 parent 258cda3 commit 2509236
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions packages/nx/src/command-line/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ export async function connectToNxCloudIfExplicitlyAsked(opts: {
}
}

export async function connectToNxCloudCommand(
promptOverride?: string
): Promise<boolean> {
if (isNxCloudUsed()) {
export async function connectToNxCloudCommand({
promptOverride,
quiet,
}: { promptOverride?: string; quiet?: boolean } = {}): Promise<boolean> {
if (isNxCloudUsed() && !quiet) {
output.log({
title: '✅ This workspace is already connected to Nx Cloud.',
bodyLines: [
Expand Down
7 changes: 4 additions & 3 deletions packages/nx/src/command-line/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1194,9 +1194,10 @@ async function generateMigrationsJsonAndUpdatePackageJson(
(await isMigratingToNewMajor(from, opts.targetVersion)) &&
!isCI()
) {
const useCloud = await connectToNxCloudCommand(
messages.getPromptMessage('nxCloudMigration')
);
const useCloud = await connectToNxCloudCommand({
promptOverride: messages.getPromptMessage('nxCloudMigration'),
quiet: true,
});
await recordStat({
command: 'migrate',
nxVersion,
Expand Down

0 comments on commit 2509236

Please sign in to comment.