Skip to content

Commit

Permalink
fix(hook): 🐛 cog always returns status 0 so interpret the command output
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Villard <[email protected]>
  • Loading branch information
eviweb committed Jun 24, 2022
1 parent adbc7b0 commit fb6d225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/git/hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bin()
COMMIT_MSG_FILE="$1"
MESSAGE="$(cat "${COMMIT_MSG_FILE}")"

if "$(bin)"/cog verify "${MESSAGE}"; then
if "$(bin)"/cog verify "${MESSAGE}" |& grep -q "(not committed) - now"; then
echo "${MESSAGE}" | "$(bin)"/insert-icon > "${COMMIT_MSG_FILE}"

else
Expand Down

0 comments on commit fb6d225

Please sign in to comment.