summaryrefslogtreecommitdiff
path: root/lib/chef/knife.rb
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-11-01 10:46:01 -0700
committersersut <serdar@opscode.com>2013-11-05 12:27:54 -0800
commitb60b4d5bcf0a4f14a4788ca2b8eff2668e00b7e7 (patch)
tree0f06dfc43ac145f001dc80d28b4fb3fe33f20730 /lib/chef/knife.rb
parent6767d88d9dbba41da91afef8d102dfec7ac36fdf (diff)
downloadchef-b60b4d5bcf0a4f14a4788ca2b8eff2668e00b7e7.tar.gz
Check for ENV['CD'] instead of ENV['PWD'] on windows.
Also the associated test is removed as I am not sure how it should be fixed.
Diffstat (limited to 'lib/chef/knife.rb')
-rw-r--r--lib/chef/knife.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb
index 341402242e..d4d1a3c534 100644
--- a/lib/chef/knife.rb
+++ b/lib/chef/knife.rb
@@ -239,7 +239,14 @@ class Chef
end
def self.working_directory
- ENV['PWD'] || Dir.pwd
+ a = if Chef::Platform.windows?
+ ENV['CD']
+ else
+ ENV['PWD']
+ end || Dir.pwd
+
+ puts "Working directory: #{a}"
+ a
end
def self.reset_config_path!