#1551·husky

Pre-push hook stuck after unit tests pass

Author: maxcl10Created Jan 9, 2025Updated Jan 21, 2026

I'm using Husky (9.1.5) in my Angular (18.1.11) application. I only have one pre-push configuration which launch the unit test before push. Everything was working fine but me and my team recently updated windows 11 (with 24H2) and now the push is not done anymore. After the test successfully pass, the push process does not proceed, and there is no error or clear indication of what's causing the hook to hang.

Steps to Reproduce

  • Configure a pre-push hook using Husky that runs unit tests before pushing.
  • Push changes to the repository (git push).
  • Observe that the hook runs, the unit tests pass successfully, but then the process hangs indefinitely.

Additional Information

Environment:

  • Operating System: Windows 11 (recently updated to 24H2)
  • Git Version: 2.47.1
  • Node: 20.11.1
  • Husky Version: 9.1.5
  • Application Framework: Angular 18.1.11

Issue Context:

I am using Husky in my Angular application to configure Git hooks. The pre-push configuration runs unit tests before pushing. Everything was working fine until I and my team recently updated to Windows 11 (24H2). After the update, the push process gets stuck after the unit tests pass, and the push is not performed.

Troubleshooting Steps:

  • Verified that the pre-push script exits with appropriate status codes.
  • Confirmed there are no blocking commands or prompts in the script.
  • Tested with git push --no-verify to confirm the issue is related to the hook.
  • Observed that the issue occurs across multiple team members using the same Windows update.

Temporary Workaround:

  • Using git push --no-verify bypasses the hook but skips crucial checks, which is not ideal.

Thank you!