Skip to content

Commit

Permalink
fix(common): always import relative sol files from ./
Browse files Browse the repository at this point in the history
  • Loading branch information
alvrs committed Sep 24, 2023
1 parent 44a5432 commit 90abeed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/common/src/codegen/utils/loadUserTypesFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ function loadUserTypesFile(
data: string;
} {
if (unresolvedFilePath.at(0) === ".") {
const relativePath = path.relative(outputBaseDirectory, unresolvedFilePath);
return {
filePath: path.relative(outputBaseDirectory, unresolvedFilePath),
filePath: "./" + relativePath, // solc doesn't like relative paths without "./"
data: readFileSync(unresolvedFilePath, "utf8"),
};
} else {
Expand Down

0 comments on commit 90abeed

Please sign in to comment.