mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
bugfix: use new volcano backend for registry key
This commit is contained in:
parent
888f8588fb
commit
e57e5f3fd6
1 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,11 @@
|
|||
|
||||
require 'json'
|
||||
|
||||
# Usage:
|
||||
# describe registry_key('Task Scheduler','HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Schedule') do
|
||||
# its('Start') { should eq 2 }
|
||||
# end
|
||||
|
||||
class RegistryKey < Vulcano.resource(1)
|
||||
name 'registry_key'
|
||||
|
||||
|
@ -18,7 +23,7 @@ class RegistryKey < Vulcano.resource(1)
|
|||
|
||||
def getRegistryValue(path, key)
|
||||
cmd = "(Get-Item 'Registry::#{path}').GetValue('#{key}')"
|
||||
command_result ||= @runner.run_command(cmd)
|
||||
command_result ||= vulcano.run_command(cmd)
|
||||
val = { exit_code: command_result.exit_status.to_i, data: command_result.stdout }
|
||||
val
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue