download_strategy: escape spaces in git submodule path.

for issue Homebrew/homebrew#36646

Closes Homebrew/homebrew#36649.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Kashif Rasul 2015-02-08 14:08:48 +01:00 committed by Mike McQuaid
parent 2abd3298f9
commit 003d650e88

View File

@ -652,7 +652,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
def checkout_submodules(dst) def checkout_submodules(dst)
escaped_clone_path = cached_location.to_s.gsub(/\//, '\/') escaped_clone_path = cached_location.to_s.gsub(/\//, '\/')
sub_cmd = "git checkout-index -a -f --prefix=#{dst}/${toplevel/#{escaped_clone_path}/}/$path/" sub_cmd = "git checkout-index -a -f --prefix=#{dst}/${toplevel/#{escaped_clone_path}/}/\'$path\'/"
quiet_safe_system "git", "submodule", "foreach", "--recursive", sub_cmd quiet_safe_system "git", "submodule", "foreach", "--recursive", sub_cmd
end end
end end