git-last-commit icon indicating copy to clipboard operation
git-last-commit copied to clipboard

return `Error` instead of `string`

Open EndangeredMassa opened this issue 2 years ago • 1 comments

When this error happens, an Error should be returned to match Node.js convention.

I was using this library and had some issues related to an error being a string.

EndangeredMassa avatar Dec 12 '22 22:12 EndangeredMassa

That's nice but this is not enough to keep the entire library consistent as there are other places in the code where callback is called with an err string at the moment. Also tests are failing in your branch. I will try to apply this pattern to other callbacks and then merge.

seymen avatar Dec 21 '22 08:12 seymen