summaryrefslogtreecommitdiff
path: root/lib/chef/shell.rb
diff options
context:
space:
mode:
authorJon Cowie <jcowie@chef.io>2017-08-10 13:53:53 +0100
committerJon Cowie <jcowie@chef.io>2017-08-10 14:16:44 +0100
commit4ee933275c5ff635bad93aa6f3e5faa1513e2807 (patch)
tree16c29b2f42f40bfaedf2cade5bd51492610dd908 /lib/chef/shell.rb
parent7372d0ece166ee0d5a3e25bf84861807995e58be (diff)
downloadchef-4ee933275c5ff635bad93aa6f3e5faa1513e2807.tar.gz
Pass json configuration to ShellSession class
This commit passes json configuration to ShellSession class and thusly into ChefClient object created by the ShellSession. This fixes an issue where runlists passed in via a json file using the -j flag would not be loaded when running chef-shell in client mode using the -z flag. Signed-off-by: Jon Cowie <jcowie@chef.io>
Diffstat (limited to 'lib/chef/shell.rb')
-rw-r--r--lib/chef/shell.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/shell.rb b/lib/chef/shell.rb
index b4c0277c57..40bdf01762 100644
--- a/lib/chef/shell.rb
+++ b/lib/chef/shell.rb
@@ -138,6 +138,7 @@ module Shell
def self.session
unless client_type.instance.node_built?
puts "Session type: #{client_type.session_type}"
+ client_type.instance.json_configuration = @json_attribs
client_type.instance.reset!
end
client_type.instance