Skip to content

Commit 3db9ca8

Browse files
authored
Merge pull request #14658 from anoop142/master
fixes url index out of range error in service
2 parents 7c1d80f + 13680ff commit 3db9ca8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/minikube/cmd/service.go

+6
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,12 @@ func mutateURLs(serviceName string, urls []string) ([]string, error) {
260260

261261
func openURLs(urls [][]string) {
262262
for _, u := range urls {
263+
264+
if len(u) < 4 {
265+
klog.Warning("No URL found")
266+
continue
267+
}
268+
263269
_, err := url.Parse(u[3])
264270
if err != nil {
265271
klog.Warningf("failed to parse url %q: %v (will not open)", u[3], err)

0 commit comments

Comments
 (0)