Skip to content

Commit

Permalink
fix: disabled verbose logging on setting user on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
FMotalleb committed Sep 10, 2024
1 parent 39a1e68 commit 133e83b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/os_credential/windows_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ import (
"github.com/sirupsen/logrus"
)

// NOOP if user and group are empty log a warning if not and always returns nil
func Validate(log *logrus.Entry, usr string, grp string) error {
if usr == "" && grp == "" {
return nil // skip warn message if no user and group provided
}
log.Warn("windows os does not have capability to set user thus validation will pass but will not work")
return nil
}

// NOOP
func SetUser(log *logrus.Entry, _ *exec.Cmd, _ string, _ string) {
log.Warn("cannot set user in windows platform")
}

0 comments on commit 133e83b

Please sign in to comment.