Commit af648c79 authored by Daniel DeLeo's avatar Daniel DeLeo Committed by Nuo Yan
Browse files

[CHEF-2092] guard against resource.action not returning an array

parent 951b31b2
......@@ -31,7 +31,7 @@ class Chef
def load_current_resource
@current_resource =
unless [:export, :force_export].include?(@new_resource.action.first)
unless [:export, :force_export].include?(Array(@new_resource.action).first)
if current_revision = find_current_revision
@current_resource.revision current_revision
......@@ -87,7 +87,14 @@ describe Chef::Provider::Subversion do
@provider.find_current_revision.should be_nil
it "finds the current revision when loading the current resource state" do
# note: the test is kinda janky, but it provides regression coverage for CHEF-2092
@resource.instance_variable_set(:@action, :sync)
@provider.current_resource.revision.should == "12345"
it "creates the current_resource object and sets its revision to the current deployment's revision as long as we're not exporting" do
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment