Skip to content

Commit

Permalink
windows: update interactive check
Browse files Browse the repository at this point in the history
`IsAnInteractiveSession` is deprecated
  • Loading branch information
djdv committed May 15, 2021
1 parent ef35c56 commit 52dbce9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ func (l WindowsLogger) NInfof(eventID uint32, format string, a ...interface{}) e
var interactive = false

func init() {
var err error
interactive, err = svc.IsAnInteractiveSession()
isService, err := svc.IsWindowsService()
if err != nil {
panic(err)
}
interactive = !isService
}

func (ws *windowsService) String() string {
Expand Down

0 comments on commit 52dbce9

Please sign in to comment.