Skip to content

Fix help for file_collision method without block#858

Merged
rafaelfranca merged 1 commit into
rails:mainfrom
shuuuuun:fix/file_collision_help
Aug 21, 2023
Merged

Fix help for file_collision method without block#858
rafaelfranca merged 1 commit into
rails:mainfrom
shuuuuun:fix/file_collision_help

Conversation

@shuuuuun

@shuuuuun shuuuuun commented Aug 11, 2023

Copy link
Copy Markdown
Contributor

Fix #818

Branch help for file_collision depending on block_given.

This will change the order of the help slightly, but probably not a problem.

When I ran the sample code described in the issue(#818), it looked like this:

$ ruby ./thor.rb hello
=== file_collision with no block
Overwrite ./foo.txt? (enter "h" for help) [Ynaqh] h
        Y - yes, overwrite
        n - no, do not overwrite
        a - all, overwrite this and all others
        q - quit, abort
        h - help, show this help
Overwrite ./foo.txt? (enter "h" for help) [Ynaqh] y
=== file_collision with block
Overwrite ./foo.txt? (enter "h" for help) [Ynaqdhm] h
        Y - yes, overwrite
        n - no, do not overwrite
        a - all, overwrite this and all others
        q - quit, abort
        h - help, show this help
        d - diff, show the differences between the old and the new
        m - merge, run merge tool
Overwrite ./foo.txt? (enter "h" for help) [Ynaqdhm] d
- file_collision with no block
+ file_collision with block
Retrying...
Overwrite ./foo.txt? (enter "h" for help) [Ynaqdhm] y

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.

Incorrect help for file_collision method without block

2 participants