mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-29 00:30:05 +00:00
TUN-3195: Don't colorize console logs when stderr is not a terminal
This commit is contained in:
7
vendor/golang.org/x/sys/windows/svc/mgr/config.go
generated
vendored
7
vendor/golang.org/x/sys/windows/svc/mgr/config.go
generated
vendored
@@ -98,6 +98,12 @@ func (s *Service) Config() (Config, error) {
|
||||
delayedStart = true
|
||||
}
|
||||
|
||||
b, err = s.queryServiceConfig2(windows.SERVICE_CONFIG_SERVICE_SID_INFO)
|
||||
if err != nil {
|
||||
return Config{}, err
|
||||
}
|
||||
sidType := *(*uint32)(unsafe.Pointer(&b[0]))
|
||||
|
||||
return Config{
|
||||
ServiceType: p.ServiceType,
|
||||
StartType: p.StartType,
|
||||
@@ -110,6 +116,7 @@ func (s *Service) Config() (Config, error) {
|
||||
DisplayName: windows.UTF16PtrToString(p.DisplayName),
|
||||
Description: windows.UTF16PtrToString(p2.Description),
|
||||
DelayedAutoStart: delayedStart,
|
||||
SidType: sidType,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
3
vendor/golang.org/x/sys/windows/svc/mgr/mgr.go
generated
vendored
3
vendor/golang.org/x/sys/windows/svc/mgr/mgr.go
generated
vendored
@@ -117,9 +117,6 @@ func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Se
|
||||
if c.StartType == 0 {
|
||||
c.StartType = StartManual
|
||||
}
|
||||
if c.ErrorControl == 0 {
|
||||
c.ErrorControl = ErrorNormal
|
||||
}
|
||||
if c.ServiceType == 0 {
|
||||
c.ServiceType = windows.SERVICE_WIN32_OWN_PROCESS
|
||||
}
|
||||
|
8
vendor/golang.org/x/sys/windows/svc/mgr/service.go
generated
vendored
8
vendor/golang.org/x/sys/windows/svc/mgr/service.go
generated
vendored
@@ -68,8 +68,10 @@ func (s *Service) Query() (svc.Status, error) {
|
||||
return svc.Status{}, err
|
||||
}
|
||||
return svc.Status{
|
||||
State: svc.State(t.CurrentState),
|
||||
Accepts: svc.Accepted(t.ControlsAccepted),
|
||||
ProcessId: t.ProcessId,
|
||||
State: svc.State(t.CurrentState),
|
||||
Accepts: svc.Accepted(t.ControlsAccepted),
|
||||
ProcessId: t.ProcessId,
|
||||
Win32ExitCode: t.Win32ExitCode,
|
||||
ServiceSpecificExitCode: t.ServiceSpecificExitCode,
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user