mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
kubeadm: wrap error properly in check_windows.go
This commit is contained in:
parent
672aa55ee4
commit
12750ac64f
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user