From 39efacdb26039a110f7349a020d3c87cd54ddd3f Mon Sep 17 00:00:00 2001 From: Rob Sewell Date: Wed, 5 Apr 2023 17:29:56 +0000 Subject: [PATCH] actually use the variable #934 #933 --- source/functions/Get-DbcCheck.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/functions/Get-DbcCheck.ps1 b/source/functions/Get-DbcCheck.ps1 index 971a53b5..0dc349d2 100644 --- a/source/functions/Get-DbcCheck.ps1 +++ b/source/functions/Get-DbcCheck.ps1 @@ -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 }