From d0de5af78787676c833e63661d09c7277cad532e Mon Sep 17 00:00:00 2001 From: Markus Date: Mon, 22 Feb 2021 20:14:44 +0100 Subject: [PATCH] Updated list-scripts.ps1 --- Scripts/list-scripts.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Scripts/list-scripts.ps1 b/Scripts/list-scripts.ps1 index 4c19a9c7..97add773 100755 --- a/Scripts/list-scripts.ps1 +++ b/Scripts/list-scripts.ps1 @@ -15,14 +15,15 @@ function ListScripts { param([string]$FilePath) 'Description' = "$($Row.Description)" } } + $global:NumScripts = $Table.Count write-progress -completed "Reading $FilePath..." - write-output "" - write-output "($($Table.Count) PowerShell scripts total)" } try { $PathToRepo = "$PSScriptRoot/.." - ListScripts "$PathToRepo/Data/scripts.csv" | format-table -property Script, Description + ListScripts "$PathToRepo/Data/scripts.csv" | format-table -property Script,Description + + write-host -foregroundColor green "OK - $($global:NumScripts) PowerShell scripts total" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"