diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-20 09:40:31 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-20 09:40:31 -0700 |
commit | d23b24b021364784ca79317c42d8f4028a9d7253 (patch) | |
tree | 8c1135a8b6c506cd7a1c1d321455577d7fe1b682 /lib/chef | |
parent | e265487be7f503119057621d6ef125667f06e39c (diff) | |
download | chef-d23b24b021364784ca79317c42d8f4028a9d7253.tar.gz |
add a pointer from the run_context back to the runnerlcg/runner-pointer
because surfing through Objectspace makes kittens cry
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/run_context.rb | 7 | ||||
-rw-r--r-- | lib/chef/runner.rb | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb index a606585e80..fc32ab3eeb 100644 --- a/lib/chef/run_context.rb +++ b/lib/chef/run_context.rb @@ -111,6 +111,11 @@ class Chef attr_reader :audits # + # Pointer back to the Chef::Runner that created this + # + attr_accessor :runner + + # # Notification handling # @@ -646,6 +651,8 @@ ERROR_MESSAGE root_run_context resource_collection resource_collection= + runner + runner= }.map { |x| x.to_sym } # Verify that we didn't miss any methods diff --git a/lib/chef/runner.rb b/lib/chef/runner.rb index cd5615bcec..1c82439b57 100644 --- a/lib/chef/runner.rb +++ b/lib/chef/runner.rb @@ -2,7 +2,7 @@ # Author:: Adam Jacob (<adam@chef.io>) # Author:: Christopher Walters (<cw@chef.io>) # Author:: Tim Hinderliter (<tim@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +34,7 @@ class Chef def initialize(run_context) @run_context = run_context + run_context.runner = self end def delayed_actions |