summaryrefslogtreecommitdiff
path: root/lib/chef/provider/git.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/git.rb')
-rw-r--r--lib/chef/provider/git.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb
index 028fc51c13..004e0b550d 100644
--- a/lib/chef/provider/git.rb
+++ b/lib/chef/provider/git.rb
@@ -25,8 +25,11 @@ class Chef
class Provider
class Git < Chef::Provider
+ extend Forwardable
provides :git
+ def_delegator :@new_resource, :destination, :cwd
+
def whyrun_supported?
true
end
@@ -311,10 +314,6 @@ class Chef
run_opts
end
- def cwd
- @new_resource.destination
- end
-
def git(*args, **run_opts)
git_command = ["git", args].compact.join(" ")
Chef::Log.debug "running #{git_command}"