diff options
author | Daniel Colson <danieljamescolson@gmail.com> | 2023-01-26 20:39:27 -0500 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-01-27 21:06:39 +0000 |
commit | 8429134d0d942f89fa022af38e065eb33c83523a (patch) | |
tree | a36091121560c59032054ebbfc0089485fc59d3b /lib/bundler | |
parent | 7d4395cb690c4b6be41bc51b25a8a5cda6210a81 (diff) |
[rubygems/rubygems] Don't warn on bundler binstubs --standalone --all
Prior to this commit `bundle binstubs --standalone --all` would output a
warning about not being able to generate a standalone binstub for
bundler.
This warning predates the `--all` option, and I don't think it makes
sense in this context. The warning makes good sense when explicitly
trying to generate a bundler standalone binstub with `bundle binstubs
bundler --standalone`, since that command won't do what the user might
have expected. But `--all` is not specifically asking for bundler, and
having it report each time that the bundler binstubs could not be
generated does not seem particularly helpful. The only way to make that
warning go away would be to stop using `--standalone --all`.
This commit skips the warning when running with the `--all` option.
https://github.com/rubygems/rubygems/commit/e6a72e19eb
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/cli/binstubs.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/cli/binstubs.rb b/lib/bundler/cli/binstubs.rb index 09541b1955..fc2fad47a5 100644 --- a/lib/bundler/cli/binstubs.rb +++ b/lib/bundler/cli/binstubs.rb @@ -40,7 +40,11 @@ module Bundler end if options[:standalone] - next Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") if gem_name == "bundler" + if gem_name == "bundler" + Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") unless options[:all] + next + end + Bundler.settings.temporary(:path => (Bundler.settings[:path] || Bundler.root)) do installer.generate_standalone_bundler_executable_stubs(spec, installer_opts) end |