Merge pull request #88945 from sandyleo26/kubeadm-check-windows-wrap-error-properly

fix: #2056 check_windows wrap error properly
This commit is contained in:
Kubernetes Prow Robot 2020-03-17 19:28:29 -07:00 committed by GitHub
commit d45fa525e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,12 +32,12 @@ const administratorSID = "S-1-5-32-544"
func (ipuc IsPrivilegedUserCheck) Check() (warnings, errorList []error) {
currUser, err := user.Current()
if err != nil {
return nil, []error{errors.New("cannot get current user")}
return nil, []error{errors.Wrap(err, "cannot get current user")}
}
groupIds, err := currUser.GroupIds()
if err != nil {
return nil, []error{errors.New("cannot get group IDs for current user")}
return nil, []error{errors.Wrap(err, "cannot get group IDs for current user")}
}
for _, sid := range groupIds {