From 5aeefc301b8450e5fc6931c9f93245c76577131a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 17 Sep 2021 09:05:53 +0200 Subject: [PATCH] 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. --- core/cli/ci.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/cli/ci.el b/core/cli/ci.el index 5a308237f..b608a326c 100644 --- a/core/cli/ci.el +++ b/core/cli/ci.el @@ -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)))))))) ;;