File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed
packages/nx-plugin/src/executors Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ export default async function runAutorunExecutor(
2828 normalizedContext ,
2929 ) ;
3030 const { dryRun, verbose, command } = mergedOptions ;
31-
3231 const commandString = createCliCommandString ( {
3332 command,
3433 args : cliArgumentObject ,
@@ -43,10 +42,6 @@ export default async function runAutorunExecutor(
4342 try {
4443 await executeProcess ( {
4544 ...createCliCommandObject ( { command, args : cliArgumentObject } ) ,
46- observer : {
47- onError : logger . error ,
48- onStdout : process . stdout . write ,
49- } ,
5045 ...( context . cwd ? { cwd : context . cwd } : { } ) ,
5146 } ) ;
5247 } catch ( error ) {
@@ -58,7 +53,6 @@ export default async function runAutorunExecutor(
5853 } ;
5954 }
6055 }
61-
6256 return {
6357 success : true ,
6458 command : commandString ,
Original file line number Diff line number Diff line change 1+ import { logger } from '@nx/devkit' ;
2+ import { ProcessConfig } from '../../internal/execute-process.js' ;
3+
14export function createCliCommandString ( options ?: {
25 args ?: Record < string , unknown > ;
36 command ?: string ;
@@ -13,15 +16,19 @@ export function createCliCommandObject(options?: {
1316 args ?: Record < string , unknown > ;
1417 command ?: string ;
1518 bin ?: string ;
16- } ) : {
17- command : string ;
18- args : string [ ] ;
19- cwd ?: string ;
20- } {
19+ } ) : ProcessConfig {
2120 const { bin = '@code-pushup/cli' , command, args } = options ?? { } ;
2221 return {
2322 command : 'npx' ,
2423 args : [ bin , ...objectToCliArgs ( { _ : command ?? [ ] , ...args } ) ] ,
24+ observer : {
25+ onError : error => {
26+ logger . error ( error . message ) ;
27+ } ,
28+ onStdout : data => {
29+ logger . log ( data ) ;
30+ } ,
31+ } ,
2532 } ;
2633}
2734
You can’t perform that action at this time.
0 commit comments