From 9904e6592347d3c06c923cdad0a89481fb960662 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Sat, 10 Oct 2015 00:31:30 +0200 Subject: [PATCH] run os detection in proper context --- lib/vulcano/shell.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/vulcano/shell.rb b/lib/vulcano/shell.rb index 04d0f5fd1..096f515f0 100644 --- a/lib/vulcano/shell.rb +++ b/lib/vulcano/shell.rb @@ -7,8 +7,9 @@ module Vulcano::Shell # load and configure pry require 'pry' configure_pry - - runner.add_content('binding.pry', __FILE__, __LINE__) + # store context to run commands in this context + @ctx = runner.create_context + runner.add_content('binding.pry', __FILE__, __LINE__, @ctx) runner.run end @@ -50,8 +51,8 @@ For example: You are currently running on: - OS family: #{mark os[:family] || 'unknown'} - OS release: #{mark os[:release] || 'unknown'} + OS family: #{mark @ctx.profile_context.os[:family] || 'unknown'} + OS release: #{mark @ctx.profile_context.os[:release] || 'unknown'} EOF end