From c1f3bd49ccc6486b73ec1b5a7041f80b5fd07484 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Mon, 22 Aug 2022 11:12:19 +0900 Subject: [PATCH] winsvc: require serverengine In #3849, getting ruby's path was replaced with `ServerEngine.ruby_bin_path` but `require 'serverengine'` was missing. As a result it fails to launch fluentd service. Signed-off-by: Takuro Ashie --- lib/fluent/winsvc.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fluent/winsvc.rb b/lib/fluent/winsvc.rb index d371922382..15de68d661 100644 --- a/lib/fluent/winsvc.rb +++ b/lib/fluent/winsvc.rb @@ -19,6 +19,8 @@ require 'optparse' require 'win32/daemon' require 'win32/event' + require 'win32/registry' + require 'serverengine' include Win32 @@ -33,7 +35,6 @@ end def read_fluentdopt(service_name) - require 'win32/registry' Win32::Registry::HKEY_LOCAL_MACHINE.open("SYSTEM\\CurrentControlSet\\Services\\#{service_name}") do |reg| reg.read("fluentdopt")[1] rescue "" end