From b648c8e24fa64fbc9be725672d2b8fa0e3cc6da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 29 Sep 2020 13:19:47 +0200 Subject: [PATCH] This should work everywhere, hopefully --- bundler/lib/bundler/source/git/git_proxy.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bundler/lib/bundler/source/git/git_proxy.rb b/bundler/lib/bundler/source/git/git_proxy.rb index 180fb210ffa1..5dc1c8de32d7 100644 --- a/bundler/lib/bundler/source/git/git_proxy.rb +++ b/bundler/lib/bundler/source/git/git_proxy.rb @@ -136,7 +136,9 @@ def copy_to(destination, submodules = false) if submodules git_retry "submodule update --init --recursive", :dir => destination elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0") - git_retry 'submodule foreach --quiet "git -C \$toplevel submodule deinit --force \$sm_path"', :dir => destination + inner_command = "git -C $toplevel submodule deinit --force $sm_path" + inner_command = inner_command.gsub("$") { '\$' } unless Bundler::WINDOWS + git_retry "submodule foreach --quiet \"#{inner_command}\"", :dir => destination end end