summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/provider/git.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb
index fcc7c81a99..53efdb39de 100644
--- a/lib/chef/provider/git.rb
+++ b/lib/chef/provider/git.rb
@@ -164,7 +164,11 @@ class Chef
def enable_submodules
if @new_resource.enable_submodules
- converge_by("enable git submodules for #{@new_resource}") do
+ converge_by("enable git submodules for #{@new_resource}") do
+ Chef::Log.info "#{@new_resource} synchronizing git submodules"
+ command = "git submodule sync"
+ shell_out!(command, run_options(:cwd => @new_resource.destination, :log_level => :info))
+
Chef::Log.info "#{@new_resource} enabling git submodules"
# the --recursive flag means we require git 1.6.5+ now, see CHEF-1827
command = "git submodule update --init --recursive"