summaryrefslogtreecommitdiff
path: root/lib/chef/shell.rb
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2014-11-11 14:51:22 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2014-11-11 14:51:22 -0800
commit136fe8af2e37d66765412a4fa01067aa10e87f12 (patch)
treec958179d977ff4ceb9ca0c61451f7910b868a5d2 /lib/chef/shell.rb
parent7bd20f0eb39d507fa43d359351c25d9e3a570ed3 (diff)
parente54f3cfe7a17c23c35408b465ce5e9648396aa88 (diff)
downloadchef-136fe8af2e37d66765412a4fa01067aa10e87f12.tar.gz
Merge pull request #2395 from opscode/jdmundrawala/chef-shell-windows
chef-shell checks platform when looking for client.rb and solo.rb.
Diffstat (limited to 'lib/chef/shell.rb')
-rw-r--r--lib/chef/shell.rb12
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