From b15bf0464f5c67331330578a557d39307bd3dfa1 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Thu, 18 Jun 2026 17:21:14 -0700 Subject: [PATCH] fix(ci): pin PSDepend to 0.4.1 to fix PS5.1 bootstrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build.ps1 -Bootstrap failed on Windows PowerShell 5.1 with: PSDepend\0.3.8\Private\SemanticVersion.ps1: Cannot add type. The type name 'System.Management.Automation.SemanticVersion' already exists. PSDepend 0.3.8 ships an unguarded Add-Type for its PS5.1 SemanticVersion polyfill (`if ($PSVersionTable.PSVersion.Major -lt 6)`). On PS5.1 the type isn't built in, so when PSDepend is imported a second time in the same session — as happens during bootstrap when PSDepend is listed as a dependency of itself — the second Add-Type throws because the type already exists. PS6+ is unaffected since the type is built in and the guard short-circuits. PSDepend 0.4.1 adds the missing existence guard (`-and -not ('System.Management.Automation.SemanticVersion' -as [type])`), making the polyfill idempotent. Bump the pin to 0.4.1. Co-Authored-By: Claude Opus 4.8 --- requirements.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.psd1 b/requirements.psd1 index 9cf0475..e401e1c 100644 --- a/requirements.psd1 +++ b/requirements.psd1 @@ -1,6 +1,6 @@ @{ PSDepend = @{ - Version = '0.3.8' + Version = '0.4.1' } PSDependOptions = @{ Target = 'CurrentUser'