$ErrorActionPreference = "Stop" & git diff --check if ($LASTEXITCODE -ne 0) { throw "git diff --check failed." } Write-Host "PASS: whitespace and line ending check passed."