Skip to content

Commit

Permalink
fix(misc): format command prints an irrelevant warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Jun 15, 2022
1 parent 69e5549 commit 2695b27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/format.ts
Expand Up @@ -39,7 +39,7 @@ export async function format(
const { nxArgs } = splitArgsIntoNxArgsAndOverrides(
args,
'affected',
{ printWarnings: true },
{ printWarnings: false },
readNxJson()
);
const patterns = (await getPatterns({ ...args, ...nxArgs } as any)).map(
Expand Down
5 changes: 4 additions & 1 deletion packages/nx/src/utils/command-line-utils.ts
Expand Up @@ -185,7 +185,10 @@ export function splitArgsIntoNxArgsAndOverrides(
if (explicitOverrides) {
overrides = explicitOverrides;
overrides['__overrides_unparsed__'] = args.__overrides__;
if (Object.keys(overridesFromMainArgs).length > 0) {
if (
Object.keys(overridesFromMainArgs).length > 0 &&
options.printWarnings
) {
const s = Object.keys(overridesFromMainArgs).join(', ');
output.warn({
title: `Nx didn't recognize the following args: ${s}`,
Expand Down

1 comment on commit 2695b27

@vercel
Copy link

@vercel vercel bot commented on 2695b27 Jun 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx.dev
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app

Please sign in to comment.