From 2e12253a11752db065bbad69f104660272c2bfbe Mon Sep 17 00:00:00 2001 From: Alexander Kanevskiy Date: Fri, 28 Oct 2016 15:07:21 +0300 Subject: [PATCH] fix usage of errors.Wrap() Format strings are not supported by errors.Wrap, so cleanup them from error output where it is not needed. --- cmd/minikube/cmd/env.go | 4 ++-- pkg/minikube/cluster/cluster.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/minikube/cmd/env.go b/cmd/minikube/cmd/env.go index 124726f879..4fcdebe8b6 100644 --- a/cmd/minikube/cmd/env.go +++ b/cmd/minikube/cmd/env.go @@ -106,12 +106,12 @@ func shellCfgSet(api libmachine.API) (*ShellConfig, error) { host, err := api.Load(constants.MachineName) if err != nil { - return nil, errors.Wrap(err, "Error getting IP: ") + return nil, errors.Wrap(err, "Error getting IP") } ip, err := host.Driver.GetIP() if err != nil { - return nil, errors.Wrap(err, "Error getting host IP: %s") + return nil, errors.Wrap(err, "Error getting host IP") } noProxyVar, noProxyValue := findNoProxyFromEnv() diff --git a/pkg/minikube/cluster/cluster.go b/pkg/minikube/cluster/cluster.go index 070d3f4bf9..c772479a31 100644 --- a/pkg/minikube/cluster/cluster.go +++ b/pkg/minikube/cluster/cluster.go @@ -95,7 +95,7 @@ func StartHost(api libmachine.API, config MachineConfig) (*host.Host, error) { } if err := h.ConfigureAuth(); err != nil { - return nil, errors.Wrap(&util.RetriableError{Err: err}, "Error configuring auth on host: %s") + return nil, errors.Wrap(&util.RetriableError{Err: err}, "Error configuring auth on host") } return h, nil } @@ -418,7 +418,7 @@ func createHost(api libmachine.API, config MachineConfig) (*host.Host, error) { h, err := api.NewHost(config.VMDriver, data) if err != nil { - return nil, errors.Wrap(err, "Error creating new host: %s") + return nil, errors.Wrap(err, "Error creating new host") } h.HostOptions.AuthOptions.CertDir = constants.Minipath