From 52dbce91601609b5420244496055cc0ef41f3eb3 Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Fri, 14 May 2021 13:22:05 -0400 Subject: [PATCH] windows: update interactive check `IsAnInteractiveSession` is deprecated --- service_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service_windows.go b/service_windows.go index c6ee3a6c..155d3560 100644 --- a/service_windows.go +++ b/service_windows.go @@ -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 {