/
patch-remove-bundler
40 lines (31 loc) · 1.5 KB
/
patch-remove-bundler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
commit b110d12e9c3bd2d153886681ff42c53c59ecd12d
Author: Thibault Jouan <tj@a13.fr>
AuthorDate: Mon Oct 11 23:54:27 2021 +0000
Commit: Thibault Jouan <tj@a13.fr>
CommitDate: Wed Oct 13 11:49:25 2021 +0000
Prevent bundler installation
Since RubyGems 3.1 the `setup' command also installs bundler and the
`USE_BUNDLER_FOR_GEMDEPS' environment variable has been removed.
We have to manually patch this command to remove bundler installation.
--- lib/rubygems/commands/setup_command.rb.orig 2022-07-27 18:12:33 UTC
+++ lib/rubygems/commands/setup_command.rb
@@ -171,8 +171,6 @@ By default, this RubyGems will install gem as:
# Can be removed one we drop support for bundler 2.2.3 (the last version installing man files to man_dir)
remove_old_man_files man_dir if man_dir && File.exist?(man_dir)
- install_default_bundler_gem bin_dir
-
if mode = options[:dir_mode]
@mkdirs.uniq!
File.chmod(mode, @mkdirs)
@@ -306,7 +304,6 @@ By default, this RubyGems will install gem as:
def install_lib(lib_dir)
libs = { "RubyGems" => "lib" }
- libs["Bundler"] = "bundler/lib"
libs.each do |tool, path|
say "Installing #{tool}" if @verbose
@@ -504,7 +501,6 @@ abort "#{deprecation_message}"
def remove_old_lib_files(lib_dir)
lib_dirs = { File.join(lib_dir, "rubygems") => "lib/rubygems" }
- lib_dirs[File.join(lib_dir, "bundler")] = "bundler/lib/bundler"
lib_dirs.each do |old_lib_dir, new_lib_dir|
lib_files = files_in(new_lib_dir)