mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #1653 from KnicKnic/enable_agent_windows
enable agent to start on windows
This commit is contained in:
commit
7d06d2ccc1
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/rancher/k3s/pkg/agent"
|
||||
"github.com/rancher/k3s/pkg/cli/cmds"
|
||||
@ -19,7 +20,7 @@ func Run(ctx *cli.Context) error {
|
||||
if err := cmds.InitLogging(); err != nil {
|
||||
return err
|
||||
}
|
||||
if os.Getuid() != 0 {
|
||||
if os.Getuid() != 0 && runtime.GOOS != "windows" {
|
||||
return fmt.Errorf("agent must be ran as root")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user