From f9ea712caa522ebcfcc9ef43b2cad35228386c6b Mon Sep 17 00:00:00 2001 From: Dominique Vernier Date: Fri, 15 Mar 2019 10:24:57 -0400 Subject: [PATCH] Add a call to InitTLS after parsing the cmd line Signed-off-by: Dominique Vernier --- cmd/helm/helm.go | 3 +++ pkg/urlutil/urlutil_test.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index b815568cb..bab4bc2c2 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -155,6 +155,9 @@ func newRootCmd(args []string) *cobra.Command { // set defaults from environment settings.Init(flags) + // set defaults for TLS from environment + settings.InitTLS(flags) + // Find and add plugins loadPlugins(cmd, out) diff --git a/pkg/urlutil/urlutil_test.go b/pkg/urlutil/urlutil_test.go index b2af24e63..616c4f14f 100644 --- a/pkg/urlutil/urlutil_test.go +++ b/pkg/urlutil/urlutil_test.go @@ -65,8 +65,8 @@ func TestEqual(t *testing.T) { func TestExtractHostname(t *testing.T) { tests := map[string]string{ - "http://example.com": "example.com", - "https://example.com/foo": "example.com", + "http://example.com": "example.com", + "https://example.com/foo": "example.com", "https://example.com:31337/not/with/a/bang/but/a/whimper": "example.com", } for start, expect := range tests {