Skip to content

Commit bc7900f

Browse files
fix semver check
1 parent 2ba6410 commit bc7900f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/hardhat-core/src/builtin-tasks/compile.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ subtask(TASK_COMPILE_SOLIDITY_RUN_SOLC)
685685
solcPath: string;
686686
solcVersion?: string;
687687
}) => {
688-
if (solcVersion !== undefined && semver.valid(solcVersion)) {
688+
if (solcVersion !== undefined && semver.valid(solcVersion) === null) {
689689
throw new HardhatError(ERRORS.ARGUMENTS.INVALID_VALUE_FOR_TYPE, {
690690
value: solcVersion,
691691
name: "solcVersion",

0 commit comments

Comments
 (0)