From ac3f30db1e5fd3dcb81cfd761dd6acc14b2c15b9 Mon Sep 17 00:00:00 2001 From: Tomas Kracmar Date: Wed, 29 Jul 2026 11:49:21 +0200 Subject: [PATCH] fix(Bump-Version): param() must be script's first statement $ErrorActionPreference and Set-StrictMode sat before param(), so PowerShell parsed 'param(...)' as a call to a command named param instead of the script's parameter block ("The function or command was called as if it were a method"). The script never ran. Moved both statements after the param block; only #Requires and the comment-based help may precede param(). Co-Authored-By: Claude Sonnet 5 --- Bump-Version.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Bump-Version.ps1 b/Bump-Version.ps1 index 0596f4d..28ca48d 100644 --- a/Bump-Version.ps1 +++ b/Bump-Version.ps1 @@ -8,13 +8,11 @@ ################################################## ## Project: Elysium ## ## File: Bump-Version.ps1 ## -## Version: 2.4.4 ## +## Version: 2.4.5 ## ## Support: support@cqre.net ## ################################################## #Requires -Version 5.1 -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version Latest <# .SYNOPSIS @@ -41,6 +39,9 @@ param( [switch]$SkipChangelog ) +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version Latest + $scriptRoot = $PSScriptRoot if (-not $scriptRoot) { $scriptRoot = (Get-Location).Path }