mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-27 09:21:14 -06:00
addrs: Fix diagnostic for invalid provider type
This previously rendered as `Invalid provider type ""`, as `name` was empty if parsing failed. Using the source string is more helpful.
This commit is contained in:
parent
7165d6c429
commit
cadc133828
@ -192,7 +192,7 @@ func ParseProviderSourceString(str string) (Provider, tfdiags.Diagnostics) {
|
||||
diags = diags.Append(&hcl.Diagnostic{
|
||||
Severity: hcl.DiagError,
|
||||
Summary: "Invalid provider type",
|
||||
Detail: fmt.Sprintf(`Invalid provider type %q in source %q: %s"`, name, str, err),
|
||||
Detail: fmt.Sprintf(`Invalid provider type %q in source %q: %s"`, givenName, str, err),
|
||||
})
|
||||
return ret, diags
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user