chore: block node_modules commits
parent
bf925e5758
commit
9b9e8d4ae8
|
|
@ -1,4 +1,5 @@
|
||||||
node_modules
|
node_modules
|
||||||
|
**/node_modules/
|
||||||
.env
|
.env
|
||||||
docker-compose.extra.yml
|
docker-compose.extra.yml
|
||||||
dist
|
dist
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,16 @@ for file in "${files[@]}"; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Prevent staging node_modules even if a path is forced.
|
||||||
|
for file in "${files[@]}"; do
|
||||||
|
case "$file" in
|
||||||
|
*node_modules* | */node_modules | */node_modules/* | node_modules)
|
||||||
|
printf 'Error: node_modules paths are not allowed: %s\n' "$file" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
last_commit_error=''
|
last_commit_error=''
|
||||||
|
|
||||||
run_git_commit() {
|
run_git_commit() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue