Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9e64253

Browse files
FrozenPandazvsavkin
authored andcommittedMar 10, 2020
fix(misc): parse args for format command
1 parent 0a2d5be commit 9e64253

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎packages/workspace/src/command-line/format.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { createProjectGraph } from '../core/project-graph';
88
import { filterAffected } from '../core/affected-project-graph';
99
import { calculateFileChanges } from '../core/file-utils';
1010
import * as yargs from 'yargs';
11-
import { NxArgs } from './utils';
11+
import { NxArgs, splitArgsIntoNxArgsAndOverrides } from './utils';
1212

1313
const PRETTIER_EXTENSIONS = [
1414
'ts',
@@ -26,8 +26,13 @@ const PRETTIER_EXTENSIONS = [
2626
export function format(command: 'check' | 'write', args: yargs.Arguments) {
2727
let patterns: string[];
2828

29+
const { nxArgs } = splitArgsIntoNxArgsAndOverrides(args);
30+
2931
try {
30-
patterns = getPatterns(args as any);
32+
patterns = getPatterns({
33+
...args,
34+
...nxArgs
35+
} as any);
3136
} catch (e) {
3237
output.error({
3338
title: e.message,

0 commit comments

Comments
 (0)
Please sign in to comment.