Skip to content

Commit

Permalink
change isHttpPrefixedURL to isHttpSchemedURL
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlesbykumbi authored Sep 5, 2018
1 parent 59d0119 commit 92fad11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/minikube/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,16 @@ func WaitAndMaybeOpenService(api libmachine.API, namespace string, service strin
return errors.Wrap(err, "Check that minikube is running and that you have specified the correct namespace")
}
for _, urlString := range urls {
isHttpPrefixedURL := false
isHttpSchemedURL := false
if u, parseErr := url.Parse(urlString); parseErr == nil {
isHttpPrefixedURL = u.Scheme == "http"
isHttpSchemedURL = u.Scheme == "http"
}

if isHttpPrefixedURL && https {
if isHttpSchemedURL && https {
urlString = strings.Replace(urlString, "http", "https", 1)
}

if urlMode || !isHttpPrefixedURL {
if urlMode || !isHttpSchemedURL {
fmt.Fprintln(os.Stdout, urlString)
} else {
fmt.Fprintln(os.Stderr, "Opening kubernetes service "+namespace+"/"+service+" in default browser...")
Expand Down

0 comments on commit 92fad11

Please sign in to comment.