Skip to content

Commit

Permalink
bug(terraform): Fix path resolution for nested modules (#310)
Browse files Browse the repository at this point in the history
The path resolution for deeply nested modules has a bug where it doesn't
resolve the correct absolute path.
  • Loading branch information
TriPSs authored Sep 4, 2024
2 parents d1d2046 + 172b40b commit efef22c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/terraform/src/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export const createDependencies: CreateDependencies = async (_, ctx) => {
continue
}

const depSourceAbs = path.resolve(file.file, depSourcePathRel)
const depSourceAbs = path.resolve(
path.dirname(file.file),
depSourcePathRel
)

const depSourceRelativeToWorkspace = path.relative(
workspaceRoot,
Expand Down

0 comments on commit efef22c

Please sign in to comment.