bugfix (cli) Update the URL check to work with https

This commit is contained in:
Andrew Stuart
2017-01-31 08:11:54 -07:00
parent 1b04f042cd
commit 39fb45d8da
+6 -1
View File
@@ -35,7 +35,12 @@ func getClient(serverUrl string) *client.Client {
fatal("Need --server or FISSION_URL set to your fission server.")
}
serverUrl = "http://" + strings.TrimPrefix(serverUrl, "http://")
isHttps := strings.Index(serverUrl, "https://") == 0
isHttp := strings.Index(serverUrl, "http://") == 0
if !isHttp && !isHttps {
serverUrl = "http://" + serverUrl
}
return client.MakeClient(serverUrl)
}