-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix the config suggestion in the warning for $ bundle
#9164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the config suggestion in the warning for $ bundle
#9164
Conversation
41fadbe to
8395b28
Compare
bundler/CHANGELOG.md
Outdated
|
|
||
| ### Bug fixes: | ||
|
|
||
| - Fix the suggestion in the warning for the default `bundle` command [#9164](https://github.com/ruby/rubygems/pull/9164) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this. It will handle by release script automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
| end | ||
|
|
||
| desc "install_or_cli_help", "Tries to run bundle install but prints a summary of bundler commands if there is no Gemfile", hide: true | ||
| def install_or_cli_help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep this task and warn to suggest update default_cli_command to install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
* `install_or_cli_help` does not exist for older Bundler like Bundler 2 and so results in a confusing error on Bundler 2: ``` $ bundle Could not find command "". ``` * See https://github.com/ruby/rubygems/pull/9136/files#r2592366837 * Merge the behavior of `install_or_cli_help` in `install`.
* It looked like:
In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`.
Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly for scripts like CI/CD.
You can use the future behavior now with `bundle config set default_cli_command cli_help --global`,
or you can continue to use the current behavior with `bundle config set default_cli_command install --global`.
This message will be removed after a default_cli_command value is set.
Bundler version 4.0.0 (2025-12-08 commit 9b4819a)
* And now looks like:
In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`.
Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly for scripts like CI/CD.
You can use the future behavior now with `bundle config set default_cli_command cli_help --global`,
or you can continue to use the current behavior with `bundle config set default_cli_command install --global`.
This message will be removed after a default_cli_command value is set.
Bundler version 4.0.0 (2025-12-08 commit 9b4819a)
8395b28 to
979dada
Compare
|
All done, BTW I noticed the info message for default_cli_command was using |
|
I could reproduce this. I would like to keep Thank you for suggesting this. |
…-in-default-command-warning Fix the config suggestion in the warning for `$ bundle` (cherry picked from commit 03e3b78)
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