🎨 add pre-commit installation to create_env scripts

This commit is contained in:
Ondrej Samohel 2023-01-06 17:19:02 +01:00
parent 9399314761
commit bf65fd495d
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
3 changed files with 27 additions and 1 deletions

View file

@ -179,6 +179,14 @@ if ($LASTEXITCODE -ne 0) {
Set-Location -Path $current_dir
Exit-WithCode 1
}
Write-Color -Text ">>> ", "Installing pre-commit hooks ..." -Color Green, White
& "$env:POETRY_HOME\bin\poetry" run pre-commit install
if ($LASTEXITCODE -ne 0) {
Write-Color -Text "!!! ", "Installation of pre-commit hooks failed." -Color Red, Yellow
Set-Location -Path $current_dir
Exit-WithCode 1
}
$endTime = [int][double]::Parse((Get-Date -UFormat %s))
Set-Location -Path $current_dir
try