mysql: Avoid crash on un-interpolated provider cfg (#12391)
This commit is contained in:
parent
4ba145a3ac
commit
7d6e2837e1
|
@ -72,7 +72,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
|
|||
var endpoint = d.Get("endpoint").(string)
|
||||
|
||||
proto := "tcp"
|
||||
if endpoint[0] == '/' {
|
||||
if len(endpoint) > 0 && endpoint[0] == '/' {
|
||||
proto = "unix"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue