tvdstaaij / node-git-describe

Git describe information at runtime, with semver support
36 stars 5 forks source link

Cannot read property 'toString' of null when `git` is missing #17

Closed TimothyJones closed 3 years ago

TimothyJones commented 3 years ago

When the git executable is missing, gitDescribeSync fails with the rather cryptic:

TypeError: Cannot read property 'toString' of null
    at handleProcessResult (...../node_modules/git-describe/lib/git-describe.js:70:20)

(you can reproduce this easily by changing the name of the executable on line 40)

It would be excellent if we could get a clearer error thrown in that case.