Closed masshash closed 1 year ago
The function https://pkg.go.dev/golang.org/x/sys/windows/svc#IsAnInteractiveSession is deprecated because the way to detect if it's a service or not is not reliable. So I fixed to use IsWindowsService instead of IsAnInteractiveSession.
IsWindowsService
IsAnInteractiveSession
With this change, if you wrap your service with NSSM (or WinSW), script_exporter will now be correctly detected as a non-service and will be able to start as wrapped service. Fixes #47
Hi @masshash thanks for the fix 🙂
@ricoberger thanks for the quick merge and release!
The function https://pkg.go.dev/golang.org/x/sys/windows/svc#IsAnInteractiveSession is deprecated because the way to detect if it's a service or not is not reliable. So I fixed to use
IsWindowsService
instead ofIsAnInteractiveSession
.With this change, if you wrap your service with NSSM (or WinSW), script_exporter will now be correctly detected as a non-service and will be able to start as wrapped service. Fixes #47