rails / thor

Thor is a toolkit for building powerful command-line interfaces.
http://whatisthor.com/
MIT License
5.12k stars 553 forks source link

inject_into_file with pretend reports file unchanged #707

Closed scambra closed 3 years ago

scambra commented 4 years ago

Before this commit 25dc317f71f5d212d63fbd9eb4b81bd437ee762f inject_into_file with pretend option was printing inject line, but now it complains about file didn't change.

The best way it would try to replace and return success, without writing file

dorner commented 3 years ago

@scambra not sure if you're still interested in this - it looks good to me but there should be a spec to cover this behavior.

scambra commented 3 years ago

yes, I'm still interested, I will look into specs whenever I can

scambra commented 3 years ago

@dorner I have added a spec for inject_into_file with pretend