Skip to content

Commit

Permalink
Regenerating the patch for main_windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rnishtala-sumo committed Jan 18, 2024
1 parent 6d82290 commit a5f5310
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions otelcolbuilder/cmd/main_windows.go.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
--- main_windows.go 2022-12-14 15:28:41.207327800 -0800
+++ main_windows_patched.go 2022-12-14 15:27:42.320825400 -0800
@@ -41,6 +41,11 @@
}

func runService(params otelcol.CollectorSettings) error {
--- main_windows.go
+++ main_windows_patched.go
@@ -16,6 +16,10 @@ import (
func run(params otelcol.CollectorSettings) error {
// No need to supply service name when startup is invoked through
// the Service Control Manager directly.
+ err := UseCustomConfigProvider(&params)
+ if err != nil {
+ return err
+ }
+
// do not need to supply service name when startup is invoked through Service Control Manager directly
if err := svc.Run("", otelcol.NewSvcHandler(params)); err != nil {
if errors.Is(err, windows.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
// Per https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-startservicectrldispatchera#return-value
@@ -25,6 +29,7 @@ func run(params otelcol.CollectorSettings) error {

return fmt.Errorf("failed to start collector server: %w", err)
}
+

return nil
}

0 comments on commit a5f5310

Please sign in to comment.