chore: block node_modules commits
parent
bf925e5758
commit
9b9e8d4ae8
|
|
@ -1,4 +1,5 @@
|
|||
node_modules
|
||||
**/node_modules/
|
||||
.env
|
||||
docker-compose.extra.yml
|
||||
dist
|
||||
|
|
|
|||
|
|
@ -49,6 +49,16 @@ for file in "${files[@]}"; do
|
|||
fi
|
||||
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=''
|
||||
|
||||
run_git_commit() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue