From 62abfefafd4039f834b81082667d83665f506883 Mon Sep 17 00:00:00 2001 From: Karl Kauc Date: Mon, 18 May 2026 09:28:41 +0200 Subject: [PATCH] fix(powershell): nested Join-Path for Windows PowerShell 5.1 compat The 3-arg Join-Path form (-AdditionalChildPath) is PS 7+ only. Windows PowerShell 5.1 (powershell.exe) rejected the third '..' with PositionalParameterNotFound, aborting Validate-FundsXml.ps1 at line 39 before any validation ran. Nested Join-Path works in both 5.1 and 7+, honoring the script's stated 5.1 compatibility. Co-Authored-By: Claude Opus 4.7 (1M context) --- XSD_Validation/powershell/Validate-FundsXml.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/XSD_Validation/powershell/Validate-FundsXml.ps1 b/XSD_Validation/powershell/Validate-FundsXml.ps1 index 2769c0d..f2b7b08 100644 --- a/XSD_Validation/powershell/Validate-FundsXml.ps1 +++ b/XSD_Validation/powershell/Validate-FundsXml.ps1 @@ -36,7 +36,9 @@ param( $ErrorActionPreference = 'Stop' -$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot '..' '..')).Path +# Nested Join-Path: the 3-arg form (-AdditionalChildPath) is PS 7+ only; +# Windows PowerShell 5.1 accepts just -Path/-ChildPath. +$repoRoot = (Resolve-Path (Join-Path (Join-Path $PSScriptRoot '..') '..')).Path $base = "https://github.com/fundsxml/schema/releases/download/$Version" function Get-File($url, $dest) {