fix(pre-commit): correct input redirection for /dev/tty and add OpenAPI generation command

This commit is contained in:
Andras Bacsai
2025-04-13 15:49:27 +02:00
parent 927caefb42
commit 41e874eb05

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Detect whether /dev/tty is available & functional
if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then
exec < /dev/tty
exec </dev/tty
fi
# Get list of stashed PHP files
@@ -19,3 +19,5 @@ $(pwd)/vendor/bin/pint $files -q
if [ $? -eq 0 ]; then
git add $files
fi
php artisan generate:openapi