summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2014-09-29 16:16:00 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2014-09-29 16:16:00 -0700
commiteeca4cf5176605a43c0fa74459811522ec82a402 (patch)
tree5f065ce18633bcc47c3401347ebb6d23cfe61c71
parent4098cf801f8d991ab163f5ce21b81c7807dde6ff (diff)
downloadchef-eeca4cf5176605a43c0fa74459811522ec82a402.tar.gz
Windows can have git as well
-rw-r--r--lib/chef/provider/git.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb
index 9a2e6e2291..5b785c31fc 100644
--- a/lib/chef/provider/git.rb
+++ b/lib/chef/provider/git.rb
@@ -150,7 +150,8 @@ class Chef
converge_by("checkout ref #{sha_ref} branch #{@new_resource.revision}") do
# checkout into a local branch rather than a detached HEAD
- shell_out!("git branch -f #{@new_resource.checkout_branch} #{sha_ref}; git checkout #{@new_resource.checkout_branch}", run_options(:cwd => @new_resource.destination))
+ shell_out!("git branch -f #{@new_resource.checkout_branch} #{sha_ref}", run_options(:cwd => @new_resource.destination))
+ shell_out!("git checkout #{@new_resource.checkout_branch}", run_options(:cwd => @new_resource.destination))
Chef::Log.info "#{@new_resource} checked out branch: #{@new_resource.revision} onto: #{@new_resource.checkout_branch} reference: #{sha_ref}"
end
end