summaryrefslogtreecommitdiff
path: root/lib/chef/knife.rb
diff options
context:
space:
mode:
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!