File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -282,10 +282,7 @@ function matchBenchmarks(patterns) {
282
282
}
283
283
284
284
if ( benchmarks . length === 0 ) {
285
- console . warn (
286
- 'No benchmarks matching: ' +
287
- `\u001b[1m${ patterns . join ( '\u001b[0m or \u001b[1m' ) } \u001b[0m` ,
288
- ) ;
285
+ console . warn ( 'No benchmarks matching: ' + patterns . map ( bold ) . join ( '' ) ) ;
289
286
}
290
287
291
288
return benchmarks ;
@@ -312,12 +309,16 @@ function getArguments(argv) {
312
309
}
313
310
if ( assumeArgs ) {
314
311
console . warn (
315
- ` Assuming you meant: \u001b[1mbenchmark ${ assumeArgs . join ( ' ' ) } \u001b[0m` ,
312
+ ' Assuming you meant: ' + bold ( 'benchmark ' + assumeArgs . join ( ' ' ) ) ,
316
313
) ;
317
314
}
318
315
return { benchmarkPatterns, revisions } ;
319
316
}
320
317
318
+ function bold ( str ) {
319
+ return '\u001b[1m' + str + '\u001b[0m' ;
320
+ }
321
+
321
322
// Get the revisions and make things happen!
322
323
if ( require . main === module ) {
323
324
const { benchmarkPatterns, revisions } = getArguments ( process . argv . slice ( 2 ) ) ;
You can’t perform that action at this time.
0 commit comments