[ruby/resolv] quote registry value name properly

'NV Domain' needs to be quoted.

https://github.com/ruby/resolv/commit/332a16dcc0
This commit is contained in:
YO4 2025-04-17 23:52:58 +09:00 committed by git
parent b4f74e24d9
commit 0db1f47ad0

View File

@ -134,7 +134,7 @@ module Win32
""
end
else
cmd = "Get-ItemProperty -Path 'HKLM:\\#{path}' -Name '#{name}' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty #{name}"
cmd = "Get-ItemProperty -Path 'HKLM:\\#{path}' -Name '#{name}' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty '#{name}'"
output, _ = Open3.capture2('powershell', '-Command', cmd)
output.strip
end