dev(ci): fix linter error on tail-less commit msg

If the commit message lacked the diff post-amble, 'doom ci
hook-commit-msg' would throw an out-of-range error.
This commit is contained in:
Henrik Lissner 2021-09-17 09:05:53 +02:00
parent b3c01226a1
commit 5aeefc301b

View file

@ -187,8 +187,9 @@
(list (cons
"CURRENT"
(buffer-substring (point-min)
(and (re-search-forward "^# Please enter the commit message" nil t)
(match-beginning 0))))))))
(if (re-search-forward "^# Please enter the commit message" nil t)
(match-beginning 0)
(point-max))))))))
;;