Merge pull request #766 from kad/fix-err-wrap

fix usage of errors.Wrap()
pull/773/head
Matt Rickard 2016-10-28 16:44:56 +00:00 committed by GitHub
commit c388377ecd
2 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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