Skip to content

Commit 37a31d8

Browse files
committed
load library when using win32/registry
Seems the library wasn't loaded when editing the Windows registry in Ruby 4.0. Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
1 parent a4cdadc commit 37a31d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/fluent/command/fluentd.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@
344344
end
345345

346346
if fluentdopt = opts[:fluentdopt]
347+
require "win32/registry"
347348
Win32::Registry::HKEY_LOCAL_MACHINE.open("SYSTEM\\CurrentControlSet\\Services\\#{opts[:winsvc_name]}", Win32::Registry::KEY_ALL_ACCESS) do |reg|
348349
reg['fluentdopt', Win32::Registry::REG_SZ] = fluentdopt
349350
end

0 commit comments

Comments
 (0)