Skip to content

Commit 889e251

Browse files
committed
Auto merge of #2066 - rubygems:workaround-git-ls-files, r=hsbt
Workaround for non-git environment. Fixes #2064 Ignored `git` command. It's no effects for installation of vendored bundler. Because we overwrite file list when invoking `update_rubygems`.
2 parents 8eb4c56 + 4053fda commit 889e251

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
@@ -356,6 +356,10 @@ def install_default_bundler_gem
356356

357357
mkdir_p Gem::Specification.default_specifications_dir
358358

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

0 commit comments

Comments
 (0)