mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
config: only walk if non-nil
This commit is contained in:
parent
2fd545bca1
commit
3e3be5e2a3
@ -127,6 +127,7 @@ func (c *Config) Validate() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := &interpolationWalker{F: fn}
|
w := &interpolationWalker{F: fn}
|
||||||
|
if v.Default != nil {
|
||||||
if err := reflectwalk.Walk(v.Default, w); err == nil {
|
if err := reflectwalk.Walk(v.Default, w); err == nil {
|
||||||
if interp {
|
if interp {
|
||||||
errs = append(errs, fmt.Errorf(
|
errs = append(errs, fmt.Errorf(
|
||||||
@ -135,6 +136,7 @@ func (c *Config) Validate() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check for references to user variables that do not actually
|
// Check for references to user variables that do not actually
|
||||||
// exist and record those errors.
|
// exist and record those errors.
|
||||||
|
Loading…
Reference in New Issue
Block a user