@@ -3,6 +3,8 @@ import { executeProcess } from '../../internal/execute-process.js';
33import {
44 createCliCommandObject ,
55 createCliCommandString ,
6+ formatCommandLog ,
7+ objectToCliArgs ,
68} from '../internal/cli.js' ;
79import { normalizeContext } from '../internal/context.js' ;
810import type { AutorunCommandExecutorOptions } from './schema.js' ;
@@ -19,10 +21,11 @@ export default async function runAutorunExecutor(
1921 context : ExecutorContext ,
2022) : Promise < ExecutorOutput > {
2123 const normalizedContext = normalizeContext ( context ) ;
22- const { env, bin, ...mergedOptions } = mergeExecutorOptions (
23- context . target ?. options ,
24- terminalAndExecutorOptions ,
25- ) ;
24+ const {
25+ env,
26+ bin = '@code-pushup/cli' ,
27+ ...mergedOptions
28+ } = mergeExecutorOptions ( context . target ?. options , terminalAndExecutorOptions ) ;
2629 const cliArgumentObject = parseAutorunExecutorOptions (
2730 mergedOptions ,
2831 normalizedContext ,
@@ -33,12 +36,20 @@ export default async function runAutorunExecutor(
3336 bin,
3437 args : cliArgumentObject ,
3538 } ) ;
39+ const coloredCommandString = formatCommandLog (
40+ 'npx' ,
41+ [
42+ bin ,
43+ ...objectToCliArgs ( { _ : command ? [ command ] : [ ] , ...cliArgumentObject } ) ,
44+ ] ,
45+ env ,
46+ ) ;
3647 if ( verbose ) {
3748 logger . info ( `Run CLI executor ${ command ?? '' } ` ) ;
38- logger . info ( `Command: ${ commandString } ` ) ;
49+ logger . info ( `Command: ${ coloredCommandString } ` ) ;
3950 }
4051 if ( dryRun ) {
41- logger . warn ( `DryRun execution of: ${ commandString } ` ) ;
52+ logger . warn ( `DryRun execution of: ${ coloredCommandString } ` ) ;
4253 } else {
4354 try {
4455 await executeProcess ( {
0 commit comments