From 50561954605e3fa2cdb05a91b1e457b6333b4b37 Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Fri, 16 May 2025 14:38:08 +0900 Subject: [PATCH] feat: add currentsetting --- WELA.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WELA.ps1 b/WELA.ps1 index 13e37874..3097f031 100644 --- a/WELA.ps1 +++ b/WELA.ps1 @@ -66,9 +66,9 @@ class WELA { [void] Output([string] $Format) { switch ($Format.ToLower()) { "std" { - $color = if ($this.Enabled) { "Green" } else { "Red" } + $color = if ($this.CurrentSetting -eq "Enabled") { "Green" } else { "Red" } $ruleCounts = "" - $logEnabled = if ($this.Enabled) { "Enabled" } else { "Disabled" } + $logEnabled = $this.CurrentSetting $allZero = $this.RulesCount.Values | Where-Object { $_ -ne 0 } | Measure-Object | Select-Object -ExpandProperty Count if ($allZero -eq 0) { $ruleCounts = "(no rules)"