From b7dd523c8a2cc6607bd86799a4010edf278a4a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Berkefeld?= Date: Mon, 5 Jun 2023 10:36:42 +0200 Subject: [PATCH] #959: ensure commit msg template ends on a space --- .husky/post-checkout | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.husky/post-checkout b/.husky/post-checkout index e2201380c..2607e40f5 100644 --- a/.husky/post-checkout +++ b/.husky/post-checkout @@ -10,7 +10,8 @@ then fi TEMPLATE="#$TICKETID: " echo "[POST_CHECKOUT] Setting template commit to '$TEMPLATE'" -echo $TEMPLATE > ".git/templatemessage" +# wrap $TEMPLATE in quotes or else it is trimmed automatically +echo "$TEMPLATE" > ".git/templatemessage" # ### run npm install ### @@ -21,7 +22,7 @@ IFS=$'\n' NEWHEAD=$1 # $2 is the previous HEAD pointer OLDHEAD=$2 -# extract all paths to package-lock.json files +# extract all paths to package-lock.json files PACKAGE_LOCK_REGEX="(^package-lock\.json)" PACKAGES=$(git diff --name-only $NEWHEAD $OLDHEAD | grep -E $PACKAGE_LOCK_REGEX || true)