Merge pull request #501 from ThatOneCalculator/fix/precommit-cd

fix: cd in precommit hook, not in qmlfmt script
This commit is contained in:
Lemmy
2025-10-16 16:37:28 -04:00
committed by GitHub
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -4,6 +4,5 @@
# Can be installed from AUR "qmlfmt-git"
# Requires qt6-5compat
cd "$(git rev-parse --show-toplevel)"
echo "Formatting $(find . -name "*.qml" | wc -l) files..."
find . -name "*.qml" -print0 | xargs -0 -P "$(nproc)" -I {} qmlfmt -e -b 360 -t 2 -i 2 -w {}
+1 -1
View File
@@ -1,4 +1,4 @@
pre-commit:
jobs:
- name: format qml
run: ./Bin/dev/qmlfmt.sh && git update-index --again
run: cd "$(git rev-parse --show-toplevel)" && ./Bin/dev/qmlfmt.sh && git update-index --again