From 8a6457069a50b416d20e62f7dc4e93b16d30f545 Mon Sep 17 00:00:00 2001 From: Pankaj Patil Date: Tue, 6 Apr 2021 12:53:24 +0530 Subject: [PATCH] use filepath.Dir() --- pkg/iac-providers/terraform/commons/load-dir.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/iac-providers/terraform/commons/load-dir.go b/pkg/iac-providers/terraform/commons/load-dir.go index af5883b67..18f4c3270 100644 --- a/pkg/iac-providers/terraform/commons/load-dir.go +++ b/pkg/iac-providers/terraform/commons/load-dir.go @@ -198,7 +198,7 @@ func processLocalSource(req *hclConfigs.ModuleRequest) string { // path of caller dir, and join the source address of current module request to get the path to module // get the caller dir path - callDirPath := filepath.Join(req.CallRange.Filename, "..") + callDirPath := filepath.Dir(req.CallRange.Filename) // join source address to the caller dir return filepath.Join(callDirPath, req.SourceAddr)