angular-docs-cn/.husky/prepare-commit-msg
Joey Perrott 4fc24addcb build: suppress errors in git hooks (#42484)
When errors occur in git hooks, we can safely supress them as they are validated on CI.

This is primarily coming up as an issue related to needing to reinstall node_modules

PR Close #42484
2021-06-04 13:34:01 -07:00

12 lines
280 B
Bash
Executable File

#!/bin/sh
. "$(dirname $0)/_/husky.sh"
set +e
yarn -s ng-dev commit-message restore-commit-message-draft $1 $2 2>/dev/null
if [ $? -ne 0 ]; then
echo "WARNING: failed to attempt to restore commit message draft (ng-dev commit-message restore-commit-message-draft)"
fi
exit 0;