File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
v-next/hardhat/src/internal/cli Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " hardhat " : patch
3+ ---
4+
5+ Message on usage of verbose foundry flag for solidity tests (#6444 )
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212import { isCi } from "@nomicfoundation/hardhat-utils/ci" ;
1313import { readClosestPackageJson } from "@nomicfoundation/hardhat-utils/package" ;
1414import { kebabToCamelCase } from "@nomicfoundation/hardhat-utils/string" ;
15+ import chalk from "chalk" ;
1516import debug from "debug" ;
1617import { register } from "tsx/esm/api" ;
1718
@@ -194,7 +195,26 @@ export async function main(
194195
195196 await Promise . all ( [ task . run ( taskArguments ) , sendTaskAnalytics ( task . id ) ] ) ;
196197 } catch ( error ) {
197- printErrorMessages ( error , builtinGlobalOptions ?. showStackTraces ) ;
198+ // TODO: Remove after -v, -vv etc are implemented
199+ if (
200+ ( HardhatError . isHardhatError (
201+ error ,
202+ HardhatError . ERRORS . CORE . SOLIDITY . RESOLVING_NONEXISTENT_PROJECT_FILE ,
203+ ) ||
204+ HardhatError . isHardhatError (
205+ error ,
206+ HardhatError . ERRORS . CORE . TEST_PLUGIN . CANNOT_DETERMINE_TEST_RUNNER ,
207+ ) ) &&
208+ / - v + / . test ( error . message )
209+ ) {
210+ console . error (
211+ chalk . red (
212+ `\nSupport for verbose test output will be added soon. Please re-run this command without the flag.\n` ,
213+ ) ,
214+ ) ;
215+ } else {
216+ printErrorMessages ( error , builtinGlobalOptions ?. showStackTraces ) ;
217+ }
198218
199219 if ( error instanceof Error ) {
200220 try {
You can’t perform that action at this time.
0 commit comments