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