diff options
author | Evan Gilman <evan@pagerduty.com> | 2015-09-02 12:44:59 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-10-24 18:40:09 -0700 |
commit | 3bdfa8f65cf19563e35d2bad3f7fcf9263ac7881 (patch) | |
tree | bdbb2e0503a3bbebb3e3dab6bb2f182ad70183ea | |
parent | cb7712e8b0fa27b161db5d9437514d1aefa481c7 (diff) | |
download | chef-3bdfa8f65cf19563e35d2bad3f7fcf9263ac7881.tar.gz |
Consider only knife configuration for chef environment in bootstrap context
Setting these values in Chef::Config is being deprecated in favor of
using the knife config directly.
https://github.com/chef/chef/issues/3946
-rw-r--r-- | lib/chef/knife/core/bootstrap_context.rb | 2 | ||||
-rw-r--r-- | spec/unit/knife/core/bootstrap_context_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb index d210b9418f..8613a50cb4 100644 --- a/lib/chef/knife/core/bootstrap_context.rb +++ b/lib/chef/knife/core/bootstrap_context.rb @@ -40,7 +40,7 @@ class Chef end def bootstrap_environment - @chef_config[:environment] + @config[:environment] end def validation_key diff --git a/spec/unit/knife/core/bootstrap_context_spec.rb b/spec/unit/knife/core/bootstrap_context_spec.rb index 0433ef9983..4d69d6300a 100644 --- a/spec/unit/knife/core/bootstrap_context_spec.rb +++ b/spec/unit/knife/core/bootstrap_context_spec.rb @@ -91,7 +91,7 @@ EXPECTED end describe "when bootstrapping into a specific environment" do - let(:chef_config){ {:environment => "prodtastic"} } + let(:config){ {:environment => "prodtastic"} } it "starts chef in the configured environment" do expect(bootstrap_context.start_chef).to eq('chef-client -j /etc/chef/first-boot.json -E prodtastic') end |