Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
IgnoreOn implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
majkinetor committed May 21, 2017
1 parent 6f66fc9 commit 7f51a0c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AU/Public/Update-AUPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,16 @@ function Update-AUPackages {
continue main
}
}
foreach ($msg in $Options.IgnoreOn) {
if ($_.Exception -notlike "*${msg}*") { continue }
Write-Warning "Ignoring ${using:package_name}: $($_.Exception)"
return 'ignore'
}
if ($pkg) { $pkg.Error = $_ }
}
}
if (!$pkg) { throw "'$using:package_name' update script returned nothing" }

if (($pkg -eq 'ignore') -or ($pkg[-1] -eq 'ignore')) { return 'ignore' }

$pkg = $pkg[-1]
Expand Down

0 comments on commit 7f51a0c

Please sign in to comment.