Skip to content

Commit ba99fec

Browse files
authored
fix(scripts): handle dependabot disable errors gracefully (#64)
1 parent 1ad7e82 commit ba99fec

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/setup-repo.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ function Setup-Repository {
127127
Write-Host ""
128128

129129
Write-Host "4. Disabling Dependabot..." -ForegroundColor Yellow
130+
$ErrorActionPreference = "Continue"
130131
gh api "repos/$FullRepo/vulnerability-alerts" -X DELETE 2>$null
131132
Write-Host " - Vulnerability alerts: disabled" -ForegroundColor Green
132133
gh api "repos/$FullRepo/automated-security-fixes" -X DELETE 2>$null
133134
Write-Host " - Automated security fixes: disabled" -ForegroundColor Green
135+
$ErrorActionPreference = "Stop"
134136
Write-Host ""
135137

136138
Write-Host "Done! Repository $FullRepo is configured." -ForegroundColor Cyan

0 commit comments

Comments
 (0)