MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / cliMain

Function cliMain

scripts/benchmark/main.ts:204–224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202}
203
204async function cliMain(): Promise<void> {
205 let benchArgs: BenchArgs | undefined;
206
207 try {
208 benchArgs = resolveAndValidateArgs(process.argv.slice(2));
209
210 if (benchArgs === undefined) {
211 console.log(USAGE);
212 return;
213 }
214
215 await runBenchmark(benchArgs);
216 } catch (error) {
217 if (!(error instanceof Error)) {
218 throw error;
219 }
220
221 logError(failureMessage(error, benchArgs));
222 process.exitCode = 1;
223 }
224}
225
226/**
227 * For a CommandFailedError, the message gains its captured output and only

Callers 1

main.tsFile · 0.70

Calls 4

resolveAndValidateArgsFunction · 0.90
logErrorFunction · 0.90
runBenchmarkFunction · 0.85
failureMessageFunction · 0.85

Tested by

no test coverage detected