update frontend pre-commit hook

This commit is contained in:
checktheroads 2021-01-03 11:10:20 -07:00
parent 4d01b6adfb
commit 7e4f95a19b

View file

@ -1,13 +1,12 @@
#!/usr/bin/env bash
$UI_DIR="hyperglass/ui"
UI_DIR="./hyperglass/ui"
if git diff --cached --name-only | grep --quiet "$UI_DIR"
if git diff --cached --name-only | grep --quiet $UI_DIR
then
cd $UI_DIR
yarn typecheck
else
echo "No frontend files have changed, skipping pre-commit check..."
exit 0
fi
cd $UI_DIR
yarn typecheck