diff --git a/.husky/pre-commit b/.husky/pre-commit index bbdc32625..25b2f147e 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,18 +1,19 @@ # check if default.config.ini was changed and staged if git diff --cached --name-only | grep -q 'default\.config\.ini$'; then - if [ "$SKIP_CONFIG_BUILD" = "1" ]; then - echo "" - echo "⏭️ Skipping config type generation (SKIP_CONFIG_BUILD=1)" - echo "" - else - echo "" - echo "📝 Hey! You changed default.config.ini, so let me regenerate the config types first before we commit your change..." - echo " (To skip this, run: SKIP_CONFIG_BUILD=1 git commit ...)" - echo "" - yarn bks:config:build - git add apps/studio/src/typings/bksConfig.d.ts - echo "" - echo "✅ Config types regenerated and staged!" - echo "" - fi + echo "" + echo "📝 Hey! You changed default.config.ini, so let me regenerate the config types first before we commit your change..." + echo "" + printf " Generating" + yarn bks:config:build > /dev/null 2>&1 & + pid=$! + while kill -0 $pid 2>/dev/null; do + printf "." + sleep 0.3 + done + wait $pid + echo "" + git add apps/studio/src/typings/bksConfig.d.ts + echo "" + echo "✅ Config types regenerated and staged!" + echo "" fi