Skip to content

Commit 4053fda

Browse files
committed
Workaround for non-git environment.
Ignored `git` command. It's no effects for installation of vendored bundler. Because we overwride file list when invoking `update_rubygems`.
1 parent b774cb4 commit 4053fda

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/rubygems/commands/setup_command.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,10 @@ def install_default_bundler_gem
354354

355355
mkdir_p Gem::Specification.default_specifications_dir
356356

357+
# Workaround for non-git environment.
358+
gemspec = File.read('bundler/bundler.gemspec').gsub(/`git ls-files -z`/, "''")
359+
File.open('bundler/bundler.gemspec', 'w'){|f| f.write gemspec }
360+
357361
bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
358362
bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] }
359363
bundler_spec.executables -= %w[bundler bundle_ruby]

0 commit comments

Comments
 (0)