init: return proper config errors (#24865)

Fixed a bug where we were returning earlyConfDiags instead of confDiags.
This commit is contained in:
Kristin Laemmert 2020-05-05 10:08:05 -04:00 committed by GitHub
parent 0749e419de
commit 0b76100da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,7 @@ func (c *InitCommand) Run(args []string) int {
// error suggesting the user upgrade their config manually or with
// Terraform v0.12
c.Ui.Error(strings.TrimSpace(errInitConfigErrorMaybeLegacySyntax))
c.showDiagnostics(earlyConfDiags)
c.showDiagnostics(confDiags)
return 1
}