Skip to content

Commit c1f3bd4

Browse files
committed
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 <[email protected]>
1 parent acfbb09 commit c1f3bd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/fluent/winsvc.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
require 'optparse'
2020
require 'win32/daemon'
2121
require 'win32/event'
22+
require 'win32/registry'
23+
require 'serverengine'
2224

2325
include Win32
2426

@@ -33,7 +35,6 @@
3335
end
3436

3537
def read_fluentdopt(service_name)
36-
require 'win32/registry'
3738
Win32::Registry::HKEY_LOCAL_MACHINE.open("SYSTEM\\CurrentControlSet\\Services\\#{service_name}") do |reg|
3839
reg.read("fluentdopt")[1] rescue ""
3940
end

0 commit comments

Comments
 (0)