joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.45k stars 423 forks source link

Change errors to say README.md #284

Closed lostapathy closed 5 years ago

lostapathy commented 5 years ago

If you run grip in a project with a README file (rather than README.md), it will tell you Error: No README found at . This updates the error message to README.md to match the file grip is actually trying to read.

joeyespo commented 5 years ago

Hi, @lostapathy!

This is actually intentional, with "README" meaning "any supported README file" (currently, README.md and README.markdown).

I appreciate the time taken to open the PR though. It makes me wonder if others read it as a mistake as well. If so, I wonder if "Error: No README file found at ." would make more sense. Or that might have its own version of confusion. Closing for now, defaulting to GitHub's meaning of "README".

Thanks for the PR, and thanks using grip :smiley:

lostapathy commented 5 years ago

Thanks for the feedback @joeyespo. I appreciate the sentiment but would still encourage you to change the error message somehow. From a user perspective, it's quite puzzling to be told it couldn't find a README file when one very much exists. The error message now suggests a solution (create the file README) that doesn't actually make things work. Had I not used grip successfully on other projects, I would have just assumed it was broken and given up on it, rather than trying to figure this out.

Perhaps you could expand it to say "No README.md or README.markdown" found to cover both valid cases.

Anyway - thanks for a great tool, just trying to help.