-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-githooks.ps1
More file actions
23 lines (20 loc) · 852 Bytes
/
setup-githooks.ps1
File metadata and controls
23 lines (20 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Git hooks setup wrapper script for Windows
# Auto-generated by safe git hooks installer
# Get the directory of this script
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $scriptPath
# Check if developer-setup exists
if (-not (Test-Path "$scriptPath\developer-setup")) {
Write-Host "Error: developer-setup directory not found!" -ForegroundColor Red
Write-Host "Please run the safe git-hooks-installer first."
exit 1
}
# Run the Python setup script
if (Get-Command python -ErrorAction SilentlyContinue) {
python "$scriptPath\developer-setup\setup_githooks.py" $args
} elseif (Get-Command python3 -ErrorAction SilentlyContinue) {
python3 "$scriptPath\developer-setup\setup_githooks.py" $args
} else {
Write-Host "Error: Python not found! Please install Python 3." -ForegroundColor Red
exit 1
}