summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorIgor Shpakov <igorshp@gmail.com>2015-04-11 16:43:04 +0100
committerIgor Shpakov <igorshp@gmail.com>2015-04-11 16:43:04 +0100
commit25dba2da5c910c15a7965add9be48257a0ef838a (patch)
treec97d0e14e9093dee09b56066f5e39ee36b87a82e /lib/chef
parent874b785abc912e852b401e8c0f0e687394a6f3b8 (diff)
downloadchef-25dba2da5c910c15a7965add9be48257a0ef838a.tar.gz
do not overwrite whole @run_status in #build_node
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/client.rb3
-rw-r--r--lib/chef/run_status.rb8
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index f172bb1a97..9b70082d4b 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -241,7 +241,8 @@ class Chef
# Chef::Node:: The updated node object
def build_node
policy_builder.build_node
- @run_status = Chef::RunStatus.new(node, events)
+ @run_status.node = node
+ @run_status.events = events
node
end
diff --git a/lib/chef/run_status.rb b/lib/chef/run_status.rb
index 0f181426b0..d4ed1620ca 100644
--- a/lib/chef/run_status.rb
+++ b/lib/chef/run_status.rb
@@ -23,7 +23,7 @@
# Chef run.
class Chef::RunStatus
- attr_reader :events
+ attr_accessor :events
attr_reader :run_context
@@ -39,15 +39,13 @@ class Chef::RunStatus
attr_accessor :run_id
+ attr_accessor :node
+
def initialize(node, events)
@node = node
@events = events
end
- def node
- @node
- end
-
# sets +start_time+ to the current time.
def start_clock
@start_time = Time.now