Commit 7f77c9a3 authored by Knic Knic's avatar Knic Knic

enable agent to start on windows

parent 522e0887
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"os" "os"
"runtime"
"github.com/rancher/k3s/pkg/agent" "github.com/rancher/k3s/pkg/agent"
"github.com/rancher/k3s/pkg/cli/cmds" "github.com/rancher/k3s/pkg/cli/cmds"
...@@ -19,7 +20,7 @@ func Run(ctx *cli.Context) error { ...@@ -19,7 +20,7 @@ func Run(ctx *cli.Context) error {
if err := cmds.InitLogging(); err != nil { if err := cmds.InitLogging(); err != nil {
return err return err
} }
if os.Getuid() != 0 { if os.Getuid() != 0 && runtime.GOOS != "windows" {
return fmt.Errorf("agent must be ran as root") return fmt.Errorf("agent must be ran as root")
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment