Conversation
The Thor::UndefinedCommandError exception requires 3 arguments: command, nil, and list of valid commands. Previously passing only the command string caused "wrong number of arguments (given 1, expected 3)" error that prevented asdf from creating the railstart shim. Changes: - Updated CLI#help to instantiate exception with correct signature - Version bumped to 0.2.1 - CHANGELOG.md updated with fix documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Problem
When Thor tried to handle help commands or undefined commands, it would raise Thor::UndefinedCommandError with only the command string as argument. However, the Thor exception constructor expects exactly 3 arguments: the command name, nil, and a list of valid commands. This caused a crash that prevented asdf from properly creating the railstart executable shim.
Solution
Updated the exception instantiation in
lib/railstart/cli.rbline 74 to provide all required arguments:Files Changed
lib/railstart/cli.rb: Fixed exception argument signature in CLI#help methodlib/railstart/version.rb: Bumped version to 0.2.1CHANGELOG.md: Added entry documenting the fixTest plan
Notes
This is a critical fix for the gem's executability - without this, asdf cannot properly integrate the railstart command shim.