forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: suppress errors in git hooks (angular#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 angular#42484
- Loading branch information
1 parent
a5b5136
commit 4fc24ad
Showing
3 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
#!/bin/sh | ||
. "$(dirname $0)/_/husky.sh" | ||
|
||
yarn -s ng-dev commit-message pre-commit-validate --file $1; | ||
set +e | ||
|
||
yarn -s ng-dev commit-message pre-commit-validate --file $1 2>/dev/null | ||
if [ $? -ne 0 ]; then | ||
echo "WARNING: failed to run commit message validation (ng-dev commit-mesage pre-commit-validate)" | ||
fi | ||
|
||
exit 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
#!/bin/sh | ||
. "$(dirname $0)/_/husky.sh" | ||
|
||
yarn -s ng-dev format staged; | ||
set +e | ||
yarn -s ng-dev format staged 2>/dev/null | ||
if [ $? -ne 0 ]; then | ||
echo "WARNING: failed to run file formatting (ng-dev format staged)" | ||
fi | ||
|
||
|
||
exit 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
#!/bin/sh | ||
. "$(dirname $0)/_/husky.sh" | ||
|
||
yarn -s ng-dev commit-message restore-commit-message-draft $1 $2; | ||
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; |