From 1ad5723c0ccc661198943556e060bd8d99c6b389 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Fri, 22 May 2026 06:57:16 +0200 Subject: [PATCH] Avoid duplicated $script:availableCommands in make.ps1 (#6712) --- make.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/make.ps1 b/make.ps1 index 370a21837..d3dca1a4c 100644 --- a/make.ps1 +++ b/make.ps1 @@ -18,8 +18,6 @@ Command to execute. See Cmdlet's description for more information. #> -# I'm too dumb for PowerShell, so $script:availableCommands needs to be defined in 2 places // Jack - [CmdletBinding()] param ( [Parameter(Mandatory=$false)] @@ -68,7 +66,7 @@ function activateenv() { & $PSScriptRoot\.venv\Scripts\Activate.ps1 } -$script:availableCommands = @("reformat", "stylecheck", "stylediff", "newenv", "syncenv", "activateenv") +$script:availableCommands = $MyInvocation.MyCommand.ParameterSets[0].Parameters[0].Attributes[0].ScriptBlock.Invoke() if (Test-Path -LiteralPath "$PSScriptRoot\.venv" -PathType Container) { $script:venvPython = "$PSScriptRoot\.venv\Scripts\python.exe"