aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-07-24 22:32:34 +0200
committergit <svn-admin@ruby-lang.org>2022-07-30 04:24:25 +0900
commit030050cdfa9ae65cbbcd0f708aa2459e0ef17c3a (patch)
tree0e98df397935998124faf5a9d1c9bec509bb64b8 /lib
parentb515fdcc32a6a7d484c73f090fa2a58a8662e6ca (diff)
downloadruby-030050cdfa9ae65cbbcd0f708aa2459e0ef17c3a.tar.gz
[rubygems/rubygems] Make `--standalone` play nice with `--local`
I'm not sure if using relative paths in the generated script is best for this case, since it makes the script not movable, but that can be improved later. https://github.com/rubygems/rubygems/commit/7f5bdbb842
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/install.rb2
-rw-r--r--lib/bundler/installer/standalone.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 1601fc6a98..851ae9b840 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -148,7 +148,7 @@ module Bundler
Bundler.settings.set_command_option :path, nil if options[:system]
Bundler.settings.set_command_option_if_given :path, options[:path]
- if options["standalone"] && Bundler.settings[:path].nil?
+ if options["standalone"] && Bundler.settings[:path].nil? && !options["local"]
Bundler.settings.temporary(:path_relative_to_cwd => false) do
Bundler.settings.set_command_option :path, "bundle"
end
diff --git a/lib/bundler/installer/standalone.rb b/lib/bundler/installer/standalone.rb
index 248b677233..2756626f8a 100644
--- a/lib/bundler/installer/standalone.rb
+++ b/lib/bundler/installer/standalone.rb
@@ -47,7 +47,7 @@ module Bundler
end
def bundler_path
- Bundler.root.join(Bundler.settings[:path], "bundler")
+ Bundler.root.join(Bundler.settings[:path].to_s, "bundler")
end
def gem_path(path, spec)