diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-11-10 11:19:15 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-11-10 11:19:15 -0800 |
commit | e54f3cfe7a17c23c35408b465ce5e9648396aa88 (patch) | |
tree | 8968be5127b76ef40837e072911c97b30eca9278 | |
parent | f8df84e6748e7dd71343fd7844255aa37dbfab78 (diff) | |
download | chef-e54f3cfe7a17c23c35408b465ce5e9648396aa88.tar.gz |
chef-shell checks platform when looking for client.rb and solo.rb.jdmundrawala/chef-shell-windows
https://github.com/opscode/chef/issues/2380 pointed out that on
windows, -c is required with the -z flag because it would assume
nix and look in /etc/chef for client.rb
-rw-r--r-- | lib/chef/shell.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/shell.rb b/lib/chef/shell.rb index 33c10e22a6..c5b8296c63 100644 --- a/lib/chef/shell.rb +++ b/lib/chef/shell.rb @@ -308,9 +308,17 @@ FOOTER elsif ENV['HOME'] && ::File.exist?(File.join(ENV['HOME'], '.chef', 'chef_shell.rb')) File.join(ENV['HOME'], '.chef', 'chef_shell.rb') elsif config[:solo] - "/etc/chef/solo.rb" + if Chef::Platform.windows? + "C:\\chef\\solo.rb" + else + "/etc/chef/solo.rb" + end elsif config[:client] - "/etc/chef/client.rb" + if Chef::Platform.windows? + "C:\\chef\\client.rb" + else + "/etc/chef/client.rb" + end else nil end |