Skip to content

Commit

Permalink
revert debug run
Browse files Browse the repository at this point in the history
  • Loading branch information
Son Roy Almerol committed Nov 11, 2024
1 parent 8a45535 commit 978b0fd
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions cmd/windows_agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package main

import (
"context"
"fmt"
"os"

Expand Down Expand Up @@ -33,7 +34,7 @@ func main() {
return
}

//tray := &agentTray{svc: s, ctx: context.Background()}
tray := &agentTray{svc: s, ctx: context.Background()}

if len(os.Args) > 1 && os.Args[1] == "--set-server-url" {
if len(os.Args) > 2 {
Expand Down Expand Up @@ -87,21 +88,15 @@ func main() {
}
}

err = s.Run()
if err != nil {
logger.Errorf("Error running service: %s", err)
}
/*
if !service.Interactive() {
err = s.Run()
if err != nil {
logger.Errorf("Error running service: %s", err)
}
} else {
err = tray.foregroundTray()
if err != nil {
logger.Errorf("Error running tray: %s", err)
}
if !service.Interactive() {
err = s.Run()
if err != nil {
logger.Errorf("Error running service: %s", err)
}
*/
} else {
err = tray.foregroundTray()
if err != nil {
logger.Errorf("Error running tray: %s", err)
}
}
}

0 comments on commit 978b0fd

Please sign in to comment.