File tree 2 files changed +9
-3
lines changed
packages/workspace/src/command-line
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ import { DefaultReporter } from '../tasks-runner/default-reporter';
20
20
export function affected ( command : string , parsedArgs : yargs . Arguments ) : void {
21
21
const { nxArgs, overrides } = splitArgsIntoNxArgsAndOverrides (
22
22
parsedArgs ,
23
- 'affected'
23
+ 'affected' ,
24
+ {
25
+ printWarnings : command !== 'print-affected' && ! parsedArgs . plain ,
26
+ }
24
27
) ;
25
28
26
29
const projectGraph = createProjectGraph ( ) ;
Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ const ignoreArgs = ['$0', '_'];
72
72
73
73
export function splitArgsIntoNxArgsAndOverrides (
74
74
args : yargs . Arguments ,
75
- mode : 'run-one' | 'run-many' | 'affected'
75
+ mode : 'run-one' | 'run-many' | 'affected' | 'print-affected' ,
76
+ options = { printWarnings : true }
76
77
) : { nxArgs : NxArgs ; overrides : yargs . Arguments } {
77
78
const nxSpecific =
78
79
mode === 'run-one' ? runOne : mode === 'run-many' ? runMany : runAffected ;
@@ -103,7 +104,9 @@ export function splitArgsIntoNxArgsAndOverrides(
103
104
}
104
105
105
106
if ( mode === 'affected' ) {
106
- printArgsWarning ( nxArgs ) ;
107
+ if ( options . printWarnings ) {
108
+ printArgsWarning ( nxArgs ) ;
109
+ }
107
110
if (
108
111
! nxArgs . files &&
109
112
! nxArgs . uncommitted &&
You can’t perform that action at this time.
0 commit comments