@@ -37,10 +37,8 @@ import { printVersionMessage } from "./version.js";
37
37
38
38
export async function main (
39
39
cliArguments : string [ ] ,
40
- print : ( message ?: any , ... optionalParams : any [ ] ) => void = console . log ,
40
+ print : ( message : string ) => void = console . log ,
41
41
) : Promise < void > {
42
- const hreInitStart = performance . now ( ) ;
43
-
44
42
const usedCliArguments : boolean [ ] = new Array ( cliArguments . length ) . fill (
45
43
false ,
46
44
) ;
@@ -87,11 +85,6 @@ export async function main(
87
85
} ,
88
86
) ;
89
87
90
- const hreInitEnd = performance . now ( ) ;
91
- print ( "Time to initialize the HRE (ms):" , hreInitEnd - hreInitStart ) ;
92
-
93
- const taskParsingStart = performance . now ( ) ;
94
-
95
88
const taskOrId = parseTask ( cliArguments , usedCliArguments , hre ) ;
96
89
97
90
if ( Array . isArray ( taskOrId ) ) {
@@ -123,17 +116,7 @@ export async function main(
123
116
task ,
124
117
) ;
125
118
126
- const taskParsingEnd = performance . now ( ) ;
127
-
128
- print ( "Time to parse the task (ms):" , taskParsingEnd - taskParsingStart ) ;
129
-
130
- const taskRunningStart = performance . now ( ) ;
131
-
132
119
await task . run ( taskArguments ) ;
133
-
134
- const taskRunningEnd = performance . now ( ) ;
135
-
136
- print ( "Time to run the task (ms):" , taskRunningEnd - taskRunningStart ) ;
137
120
} catch ( error ) {
138
121
process . exitCode = 1 ;
139
122
@@ -144,7 +127,7 @@ export async function main(
144
127
145
128
// TODO: Print the errors nicely, especially `HardhatError`s.
146
129
147
- print ( " Error running the task:" , error . message ) ;
130
+ print ( ` Error running the task: ${ error . message } ` ) ;
148
131
149
132
if ( hardhatSpecialArgs . showStackTraces ) {
150
133
print ( "" ) ;
0 commit comments