From 33cb90029789eb0e26977e4244544992e1efb768 Mon Sep 17 00:00:00 2001
From: Raj Nishtala <113392743+rnishtala-sumo@users.noreply.github.com>
Date: Fri, 19 Jan 2024 11:08:47 -0500
Subject: [PATCH] Fix Windows parameters and typo
---
otelcolbuilder/cmd/main_windows.go.patch | 5 ++++-
packaging/msi/wix/components.wxs | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/otelcolbuilder/cmd/main_windows.go.patch b/otelcolbuilder/cmd/main_windows.go.patch
index c85d4fa25b..44514b1258 100644
--- a/otelcolbuilder/cmd/main_windows.go.patch
+++ b/otelcolbuilder/cmd/main_windows.go.patch
@@ -1,6 +1,6 @@
--- ./main_windows.go
+++ ./main_windows.go.patched
-@@ -17,7 +17,11 @@ import (
+@@ -17,7 +17,14 @@ import (
func run(params otelcol.CollectorSettings) error {
// No need to supply service name when startup is invoked through
// the Service Control Manager directly.
@@ -9,6 +9,9 @@
+ if err != nil {
+ return err
+ }
++ cmd := otelcol.NewCommand(params)
++ // this is only here so that the flag can be recognized by the upstream parser and displayed in help
++ cmd.Flags().StringVarP(&opAmpConfig, "remote-config", "", "", "path to opamp config file")
+ if err := svc.Run("", 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
diff --git a/packaging/msi/wix/components.wxs b/packaging/msi/wix/components.wxs
index 35b6021f89..1ed1a8b948 100644
--- a/packaging/msi/wix/components.wxs
+++ b/packaging/msi/wix/components.wxs
@@ -89,7 +89,7 @@
-
+