run os detection in proper context

This commit is contained in:
Christoph Hartmann 2015-10-10 00:31:30 +02:00
parent 22c39bdf62
commit 9904e65923

View file

@ -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