Skip to content

Commit

Permalink
fix: windows check for daytona server (#1318)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Dagelic <[email protected]>
  • Loading branch information
idagelic authored Nov 7, 2024
1 parent 52be5d1 commit 67f9ff6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/cmd/server/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ func Stop() error {
}

func getServiceConfig() (*service.Config, error) {
if runtime.GOOS == "windows" {
return nil, errors.New("daemon mode not supported on Windows")
}

user, ok := os.LookupEnv("USER")
if !ok {
return nil, errors.New("could not determine user")
Expand All @@ -129,8 +133,6 @@ func getServiceConfig() (*service.Config, error) {
}

switch runtime.GOOS {
case "windows":
return nil, errors.New("daemon mode not supported on Windows")
case "linux":
// Fix for running as root on Linux
if user == "root" {
Expand Down

0 comments on commit 67f9ff6

Please sign in to comment.