Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 14, 2025. It is now read-only.

Commit 52186a5

Browse files
Merge pull request #18 from ItsNickBarry/path-fix
fix sources path resolution for compatibility with hardhat-foundry
2 parents 83328c5 + 8857f28 commit 52186a5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎tasks/compile.js‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ const generate = function (dependency) {
1919
task(TASK_COMPILE, async function (args, hre, runSuper) {
2020
const config = hre.config.dependencyCompiler;
2121

22-
const directory = path.resolve(hre.config.paths.sources, config.path);
22+
// sources path must be "resolved" for compatibility with @nomicfoundation/hardhat-foundry package
23+
const sources = path.resolve(hre.config.paths.sources);
24+
25+
const directory = path.resolve(sources, config.path);
2326
const tracker = path.resolve(directory, `.${ name }`);
2427

25-
if (!directory.startsWith(hre.config.paths.sources)) {
28+
if (!directory.startsWith(sources)) {
2629
throw new HardhatPluginError('resolved path must be inside of sources directory');
2730
}
2831

29-
if (directory === hre.config.paths.sources) {
32+
if (directory === sources) {
3033
throw new HardhatPluginError('resolved path must not be sources directory');
3134
}
3235

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /