aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 011d7dbf3..b61a994a3 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -591,11 +591,12 @@ class GitDownloadStrategy < VCSDownloadStrategy
end
def update_submodules
- safe_system 'git', 'submodule', 'update', '--init'
+ safe_system 'git', 'submodule', 'update', '--init', '--recursive'
end
def checkout_submodules(dst)
- sub_cmd = "git checkout-index -a -f --prefix=#{dst}/$path/"
+ escaped_clone_path = @clone.to_s.gsub(/\//, '\/')
+ sub_cmd = "git checkout-index -a -f --prefix=#{dst}/${toplevel/#{escaped_clone_path}/}/$path/"
safe_system 'git', 'submodule', '--quiet', 'foreach', '--recursive', sub_cmd
end
end