Skip to content

Commit

Permalink
actually use the variable #934 #933
Browse files Browse the repository at this point in the history
  • Loading branch information
SQLDBAWithABeard committed Apr 5, 2023
1 parent efe48f3 commit 39efacd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/functions/Get-DbcCheck.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ function Get-DbcCheck {
$checksfile = Join-Path -Path $script:localapp -ChildPath 'checks.json'
if ($Pattern) {
if ($Pattern -notmatch '\*') {
$output = @([System.IO.File]::ReadAllText("$script:localapp/checks.json" ) | ConvertFrom-Json).ForEach{
$output = @([System.IO.File]::ReadAllText($checksfile) | ConvertFrom-Json).ForEach{
$psitem | Where-Object {
$_.Group, $_.Description , $_.UniqueTag , $_.AllTags, $_.Type -match $Pattern
}
}
} else {
$output = @([System.IO.File]::ReadAllText("$script:localapp/checks.json" ) | ConvertFrom-Json).ForEach{
$output = @([System.IO.File]::ReadAllText($checksfile) | ConvertFrom-Json).ForEach{
$psitem | Where-Object {
$_.Group, $_.Description , $_.UniqueTag , $_.AllTags, $_.Type -like $Pattern
}
Expand Down

0 comments on commit 39efacd

Please sign in to comment.