elastic / elastic-stack-installers

Windows MSI packages for Elastic stack
Apache License 2.0
2 stars 16 forks source link

Trailing slashes when using InstallDir with Beats MSI #261

Closed strawgate closed 7 months ago

strawgate commented 7 months ago

The beats MSIs support InstallDir as a paramater as of 8.13, unfortunately when used the service ends up having trailing slashes on the various path locations:

"C:\program files\winlogbeat\winlogbeat.exe" --path.home "C:\program files\winlogbeat\" --path.config "C:\program files\winlogbeat\" --path.data "C:\program files\winlogbeat\" --path.logs "C:\program files\winlogbeat\" -E logging.files.redirect_stderr=true

This may also impact normal beats MSIs as well which also appear to have trailing slashes "C:\Program Files\Elastic\Beats\8.13.2\winlogbeat\winlogbeat.exe" --path.home "C:\Program Files\Elastic\Beats\8.13.2\winlogbeat\" --path.config "C:\Program Files\Elastic\Beats\8.13.2\winlogbeat\" --path.data "C:\Program Files\Elastic\Beats\8.13.2\winlogbeat\" --path.logs "C:\Program Files\Elastic\Beats\8.13.2\winlogbeat\" -E logging.files.redirect_stderr=true

We likely just need to strip the trailing slash off the path before quoting or appending a "." where we're using installdir

Reported by: https://discuss.elastic.co/t/beats-8-13-1-services-wont-start-due-to-quoting-issues/356924