Skip to content

Commit

Permalink
Merge pull request #88945 from sandyleo26/kubeadm-check-windows-wrap-…
Browse files Browse the repository at this point in the history
…error-properly

fix: #2056 check_windows wrap error properly
  • Loading branch information
k8s-ci-robot committed Mar 18, 2020
2 parents b88ea8d + 12750ac commit d45fa52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/kubeadm/app/preflight/checks_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d45fa52

Please sign in to comment.