From 32623793210758db9896f311c98b957a9e79e30e Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Sun, 5 Mar 2017 13:58:15 +0000 Subject: [PATCH] mysql: Avoid crash on un-interpolated provider cfg (#12391) --- provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provider.go b/provider.go index a9027dc8..c333daed 100644 --- a/provider.go +++ b/provider.go @@ -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" }