Skip to content

Instantly share code, notes, and snippets.

@d1vanloon
Created November 27, 2023 19:59
Show Gist options
  • Save d1vanloon/93e39163abf2222a91fb91a0d0a4b464 to your computer and use it in GitHub Desktop.
Save d1vanloon/93e39163abf2222a91fb91a0d0a4b464 to your computer and use it in GitHub Desktop.
Git commit hook wrapper script for PowerShell hook
#!/bin/sh
pwsh_path="C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.0.0_x64__8wekyb3d8bbwe\pwsh.exe"
script_path="C:\Tools\git-hooks\commit-msg.ps1"
# Pass arguments to the PowerShell script
"$pwsh_path" -ExecutionPolicy RemoteSigned -File "$script_path" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment