mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
run os detection in proper context
This commit is contained in:
parent
22c39bdf62
commit
9904e65923
1 changed files with 5 additions and 4 deletions
|
@ -7,8 +7,9 @@ module Vulcano::Shell
|
||||||
# load and configure pry
|
# load and configure pry
|
||||||
require 'pry'
|
require 'pry'
|
||||||
configure_pry
|
configure_pry
|
||||||
|
# store context to run commands in this context
|
||||||
runner.add_content('binding.pry', __FILE__, __LINE__)
|
@ctx = runner.create_context
|
||||||
|
runner.add_content('binding.pry', __FILE__, __LINE__, @ctx)
|
||||||
runner.run
|
runner.run
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -50,8 +51,8 @@ For example:
|
||||||
|
|
||||||
You are currently running on:
|
You are currently running on:
|
||||||
|
|
||||||
OS family: #{mark os[:family] || 'unknown'}
|
OS family: #{mark @ctx.profile_context.os[:family] || 'unknown'}
|
||||||
OS release: #{mark os[:release] || 'unknown'}
|
OS release: #{mark @ctx.profile_context.os[:release] || 'unknown'}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue