Skip to content

Commit

Permalink
Merge pull request #108 from palmobar/patch-1
Browse files Browse the repository at this point in the history
Avoid SIGSEGV in map.go
  • Loading branch information
im2nguyen authored Jul 8, 2022
2 parents bac2d1a + b60b09a commit 832018b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion map.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (r *rover) GenerateModuleMap(parent *Resource, parentModule string) {
} else if rs.Type == ResourceTypeModule {
re.Name = strings.Split(id, ".")[len(strings.Split(id, "."))-1]

if configured && !childIndex.MatchString(id) {
if configured && !childIndex.MatchString(id) && configs[parentConfig].Module.ModuleCalls[matchBrackets.ReplaceAllString(re.Name, "")] != nil {
fname := filepath.Base(configs[parentConfig].Module.ModuleCalls[matchBrackets.ReplaceAllString(re.Name, "")].Pos.Filename)
re.Line = &configs[parentConfig].Module.ModuleCalls[matchBrackets.ReplaceAllString(re.Name, "")].Pos.Line

Expand Down

0 comments on commit 832018b

Please # to comment.