File tree 2 files changed +18
-13
lines changed
packages/hardhat-core/src/internal/cli
2 files changed +18
-13
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " hardhat " : patch
3
+ ---
4
+
5
+ Initialize the Hardhat Runtime Environment before passing the command line arguments.
Original file line number Diff line number Diff line change @@ -228,6 +228,19 @@ async function main() {
228
228
const taskDefinitions = ctx . tasksDSL . getTaskDefinitions ( ) ;
229
229
const scopesDefinitions = ctx . tasksDSL . getScopesDefinitions ( ) ;
230
230
231
+ const env = new Environment (
232
+ resolvedConfig ,
233
+ hardhatArguments ,
234
+ taskDefinitions ,
235
+ scopesDefinitions ,
236
+ envExtenders ,
237
+ ctx . experimentalHardhatNetworkMessageTraceHooks ,
238
+ userConfig ,
239
+ providerExtenders
240
+ ) ;
241
+
242
+ ctx . setHardhatRuntimeEnvironment ( env ) ;
243
+
231
244
// eslint-disable-next-line prefer-const
232
245
let { scopeName, taskName, unparsedCLAs } =
233
246
argumentsParser . parseScopeAndTaskNames (
@@ -304,19 +317,6 @@ async function main() {
304
317
) ;
305
318
}
306
319
307
- const env = new Environment (
308
- resolvedConfig ,
309
- hardhatArguments ,
310
- taskDefinitions ,
311
- scopesDefinitions ,
312
- envExtenders ,
313
- ctx . experimentalHardhatNetworkMessageTraceHooks ,
314
- userConfig ,
315
- providerExtenders
316
- ) ;
317
-
318
- ctx . setHardhatRuntimeEnvironment ( env ) ;
319
-
320
320
try {
321
321
const timestampBeforeRun = new Date ( ) . getTime ( ) ;
322
322
You can’t perform that action at this time.
0 commit comments