summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2024-08-26 18:44:55 +0900
committerHiroshi SHIBATA <[email protected]>2024-08-26 19:36:04 +0900
commit03475e5533551f4e65d3fab901dde7187865ef3a (patch)
treeca010e50247c444d5b452fedac437e67ee948365
parent45c04cad403235ae697c6d5cc31210d7b7d7d239 (diff)
bundle install with git repo needs to be run under the git environment
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11458
-rw-r--r--spec/bundler/cache/git_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/bundler/cache/git_spec.rb b/spec/bundler/cache/git_spec.rb
index cbd755872c..8958916fec 100644
--- a/spec/bundler/cache/git_spec.rb
+++ b/spec/bundler/cache/git_spec.rb
@@ -294,6 +294,8 @@ RSpec.describe "bundle cache with git" do
FileUtils.mkdir_p bundled_app("vendor/cache")
FileUtils.cp_r git_path, bundled_app("vendor/cache/foo-1.0-#{path_revision}")
FileUtils.rm_rf bundled_app("vendor/cache/foo-1.0-#{path_revision}/.git")
+ # bundle install with git repo needs to be run under the git environment.
+ Dir.chdir(bundled_app) { system(*%W[git init --quiet]) }
bundle :install, env: { "BUNDLE_DEPLOYMENT" => "true", "BUNDLE_CACHE_ALL" => "true" }
end