diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2021-10-30 07:43:12 +0530 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2021-10-30 07:43:12 +0530 |
commit | 05f4ab929ebe4a7db85358e27ba9c9639c1525e4 (patch) | |
tree | 5603d2b87597dd7103f8c8ccaecd2b6a56c270f3 /.husky/pre-commit | |
parent | Upgrade the Node package `pg` to at least 8.0.3 (diff) | |
download | ferdium-server-05f4ab929ebe4a7db85358e27ba9c9639c1525e4.tar.gz ferdium-server-05f4ab929ebe4a7db85358e27ba9c9639c1525e4.tar.zst ferdium-server-05f4ab929ebe4a7db85358e27ba9c9639c1525e4.zip |
Do not error out if husky has not been installed. Ignore .husky folder from Docker context
Diffstat (limited to '.husky/pre-commit')
-rwxr-xr-x | .husky/pre-commit | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/.husky/pre-commit b/.husky/pre-commit index 20d0d06..1a92cb3 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit | |||
@@ -1,4 +1,9 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | . "$(dirname "$0")/_/husky.sh" | ||
3 | 2 | ||
4 | npm run lint | 3 | FILE_NAME="$(dirname "$0")/_/husky.sh" |
4 | |||
5 | # Conditionally invoke so as to avoid running npm commands if this is a clean checkout (ie before installing npm modules) | ||
6 | if [ -f $FILE_NAME ]; then | ||
7 | . $FILE_NAME | ||
8 | npm run lint | ||
9 | fi | ||