Skip to content

Commit 9355597

Browse files
committed
Use the correct path style when constructing subpaths
1 parent 10c43a8 commit 9355597

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

v-next/hardhat/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,9 @@ export class ResolverImplementation implements Resolver {
847847
return existing as NpmPackageResolvedFile;
848848
}
849849

850-
const subpath = sourceNamePathToFsPath(
851-
path.relative(remapping.targetNpmPackage.rootSourceName, directImport),
850+
const subpath = path.relative(
851+
remapping.targetNpmPackage.rootSourceName,
852+
directImport,
852853
);
853854
const resolvedSubpath = resolveSubpath(remapping.targetNpmPackage, subpath);
854855

@@ -859,7 +860,7 @@ export class ResolverImplementation implements Resolver {
859860
await this.#validateExistanceAndCasingOfImport({
860861
from,
861862
importPath,
862-
relativeFsPathToValidate: resolvedSubpath,
863+
relativeFsPathToValidate: sourceNamePathToFsPath(resolvedSubpath),
863864
absoluteFsPathToValidateFrom: remapping.targetNpmPackage.rootFsPath,
864865
usingPackageExports: remapping.targetNpmPackage.exports !== undefined,
865866
});

0 commit comments

Comments
 (0)