Fix the config suggestion in the warning for $ bundle
#9164
+8
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
install_or_cli_helpdoes not exist for older Bundler like Bundler 2 and so results in a confusing error on Bundler 2:$ bundle Could not find command "".install_or_cli_helpininstall.What was the end-user or developer problem that led to this PR?
From https://github.com/ruby/rubygems/pull/9136/files#r2592366837
The suggestion of
bundle config set default_cli_command install_or_cli_help --globalis bad because it breaks on Bundler 2:So the suggestion should be
installand notinstall_or_cli_help.And the
installcommand can have that help behavior on missing gemfile, it's fine and simple.What is your fix for the problem, implemented in this PR?
Make the behavior of
install_or_cli_helppart ofinstalland suggest to configinstallas the default command in that warning, becauseinstallalways existed, whileinstall_or_cli_helpis only in Bundler 4.Make sure the following tasks are checked