mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Fix missing module source panic (#1888)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
parent
762eac259b
commit
6f01428333
@ -12,6 +12,7 @@ ENHANCEMENTS:
|
||||
|
||||
BUG FIXES:
|
||||
* Ensure that using a sensitive path for templatefile that it doesn't panic([#1801](https://github.com/opentofu/opentofu/issues/1801))
|
||||
* Fixed crash when module source is not present ([#1888](https://github.com/opentofu/opentofu/pull/1888))
|
||||
|
||||
## Previous Releases
|
||||
|
||||
|
@ -138,12 +138,15 @@ func buildChildModules(parent *Config, walker ModuleWalker) (map[string]*Config,
|
||||
Name: call.Name,
|
||||
Path: path,
|
||||
SourceAddr: call.SourceAddr,
|
||||
SourceAddrRange: call.Source.Range(),
|
||||
VersionConstraint: call.Version,
|
||||
Parent: parent,
|
||||
CallRange: call.DeclRange,
|
||||
Call: NewStaticModuleCall(path, call.Variables, parent.Root.Module.SourceDir, call.Workspace),
|
||||
}
|
||||
if call.Source != nil {
|
||||
// Invalid modules sometimes have a nil source field which is handled through loadModule below
|
||||
req.SourceAddrRange = call.Source.Range()
|
||||
}
|
||||
child, modDiags := loadModule(parent.Root, &req, walker)
|
||||
diags = append(diags, modDiags...)
|
||||
if child == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user