Skip to content

Conversation

@byroot
Copy link
Member

@byroot byroot commented Nov 26, 2025

Fix: #9124

This behavior is a deeply entrenched convention and changing it will annoy lots of developers with unclear gains.

Fix: ruby#9124

This behavior is a deeply entrenched convention and changing it
will annoy lots of developers with unclear gains.
@Edouard-chin
Copy link
Contributor

We can probably just revert my commit and set the default to install. e415480#diff-4a1b03faae1e535ebbffc47b0e06e57e4c6b38f404c8f5f8d66e65e0a7526ce6R83-L86 , no need to override Thor default_command anymore

@hsbt
Copy link
Member

hsbt commented Nov 27, 2025

Altanative is #9126

@byroot byroot force-pushed the default-cli-install branch from b8cf5f8 to b3994cb Compare November 28, 2025 08:04
As mentioned in ruby#9124,
the intent for changing the default command was to be more welcoming.

I think we can acheive that by attempting to install, but to print
that same help message if there is no Gemfile.

That should address both concerns.
@byroot byroot force-pushed the default-cli-install branch from b3994cb to d1634c7 Compare November 28, 2025 08:54
def find_command_possibilities(meth)
len = meth.to_s.length
possibilities = all_commands.merge(map).keys.select { |n| meth == n[0, len] }.sort
possibilities = all_commands.reject { |_k, c| c.hidden? }.merge(map).keys.select { |n| meth == n[0, len] }.sort
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add code to filter out hidden commands otherwise install_or_cli_help would show up in suggestons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep bundle as bundle install by default

4 participants