Skip to content

Commit 1dd90b9

Browse files
hsbtdeivid-rodriguez
authored andcommitted
Merge pull request #7971 from rubygems/backport-git-spec
Fix test failure with not git environment (cherry picked from commit fc1121f)
1 parent 1991b97 commit 1dd90b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bundler/spec/cache/git_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@
294294
FileUtils.mkdir_p bundled_app("vendor/cache")
295295
FileUtils.cp_r git_path, bundled_app("vendor/cache/foo-1.0-#{path_revision}")
296296
FileUtils.rm_rf bundled_app("vendor/cache/foo-1.0-#{path_revision}/.git")
297+
# bundle install with git repo needs to be run under the git environment.
298+
Dir.chdir(bundled_app) { system(*%W[git init --quiet]) }
297299

298300
bundle :install, env: { "BUNDLE_DEPLOYMENT" => "true", "BUNDLE_CACHE_ALL" => "true" }
299301
end

0 commit comments

Comments
 (0)