From 78178b0fba5bc5647aca66e458b2f1bfa8e2e4d4 Mon Sep 17 00:00:00 2001 From: "Mr.k" Date: Wed, 19 Jun 2024 20:08:26 +0300 Subject: [PATCH] Add 'ValidateRange' to 'Percent' Parameter for 'Update-Progress' Helper Function This will insure that the passed value is neither below zero nor higher than 100 Co-authored-by: Martin Wiethan <47688561+Marterich@users.noreply.github.com> --- Compile.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Compile.ps1 b/Compile.ps1 index 8633bc79..ef74005c 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -15,6 +15,7 @@ function Update-Progress { [string]$StatusMessage, [Parameter(Mandatory, position=1)] + [ValidateRange(0,100)] [int]$Percent, [Parameter(position=2)]