summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/source/git.rb1
-rw-r--r--spec/bundler/cache/git_spec.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 4e94645f6b..2a327e5fb6 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -226,6 +226,7 @@ module Bundler
git_proxy.checkout if requires_checkout?
FileUtils.cp_r("#{cache_path}/.", app_cache_path)
FileUtils.touch(app_cache_path.join(".bundlecache"))
+ FileUtils.rm_rf(Dir.glob(app_cache_path.join("hooks/*.sample")))
end
def load_spec_files
diff --git a/spec/bundler/cache/git_spec.rb b/spec/bundler/cache/git_spec.rb
index 8958916fec..7c577b105e 100644
--- a/spec/bundler/cache/git_spec.rb
+++ b/spec/bundler/cache/git_spec.rb
@@ -27,6 +27,7 @@ RSpec.describe "bundle cache with git" do
expect(bundled_app("vendor/cache/foo-1.0-#{ref}")).to exist
expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.git")).not_to exist
expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.bundlecache")).to be_file
+ expect(Dir.glob(bundled_app("vendor/cache/foo-1.0-#{ref}/hooks/*.sample"))).to be_empty
FileUtils.rm_rf lib_path("foo-1.0")
expect(the_bundle).to include_gems "foo 1.0"