From: Aleksander Grygier Date: Thu, 18 Jun 2026 06:33:50 +0000 (+0200) Subject: ui: Update code formatting command in pre-commit hook (#24685) X-Git-Tag: upstream/0.0.10438~743 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=0b73fc79fe7c8968b040e9c96d91610d7d2a8206;p=pkg%2Fggml%2Fsources%2Fllama.cpp ui: Update code formatting command in pre-commit hook (#24685) --- diff --git a/tools/ui/scripts/git-hooks/pre-commit.sh b/tools/ui/scripts/git-hooks/pre-commit.sh index 1fa83efde..208ef56fc 100755 --- a/tools/ui/scripts/git-hooks/pre-commit.sh +++ b/tools/ui/scripts/git-hooks/pre-commit.sh @@ -27,7 +27,7 @@ echo "Running pre-commit checks for llama-ui..." # Format only staged files staged_ui=$(git diff --cached --name-only -- tools/ui/) if [ -n "$staged_ui" ]; then - echo "$staged_ui" | xargs npx --no-install prettier --write + echo "$staged_ui" | xargs npm run format format_ok=$? # Re-stage formatted files git add tools/ui/ diff --git a/tools/ui/scripts/git-hooks/pre-push.sh b/tools/ui/scripts/git-hooks/pre-push.sh index 953d3a224..66d79b950 100755 --- a/tools/ui/scripts/git-hooks/pre-push.sh +++ b/tools/ui/scripts/git-hooks/pre-push.sh @@ -57,6 +57,7 @@ if [ $lint_ok -ne 0 ]; then echo "❌ Lint failed" exit 1 fi + if [ $test_ok -ne 0 ]; then echo "❌ Tests failed" exit 1