Skip to content

Commit

Permalink
so it runs quicker #933 #934
Browse files Browse the repository at this point in the history
  • Loading branch information
SQLDBAWithABeard committed Apr 5, 2023
1 parent 39efacd commit e47b542
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/functions/Get-DbcTagCollection.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ function Get-DbcTagCollection {
)

process {
$alltags = (Get-Content "$script:localapp\checks.json" | Out-String | ConvertFrom-Json) | Select-Object -ExpandProperty AllTags
$script:localapp = Get-DbcConfigValue -Name app.localapp
# so that it works cross platform
$checksfile = Join-Path -Path $script:localapp -ChildPath 'checks.json'

$alltags = ([System.IO.File]::ReadAllText($checksfile) | ConvertFrom-Json) | Select-Object -ExpandProperty AllTags
($alltags -split ",").Trim() | Where-Object { $_ -like $name } | Sort-Object | Select-Object -Unique
}
}
Expand Down

0 comments on commit e47b542

Please sign in to comment.