Skip to content

Icod.Terminal 1.0.0 — Windows PowerShell 5.1 Validation Compatibility - #35

Merged
uniblab merged 3 commits into
mainfrom
1.0.0-powershell51-validation-fix
Sep 8, 2026
Merged

Icod.Terminal 1.0.0 — Windows PowerShell 5.1 Validation Compatibility#35
uniblab merged 3 commits into
mainfrom
1.0.0-powershell51-validation-fix

Conversation

@uniblab

@uniblab uniblab commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Fixes the local build.cmd / Debug validation failure discovered after stable PR #34 merged.

Problems

packaging/VerifyLicenseHeaders.ps1 had two assumptions that were valid under PowerShell 7/.NET but not under Windows PowerShell 5.1:

  1. it called [System.IO.Path]::GetRelativePath(...), which does not exist in the .NET Framework runtime used by powershell.exe;
  2. it normalized file contents to LF before exact header comparison, but Windows PowerShell 5.1 constructs here-string templates with CRLF, causing a false header mismatch after the path issue was fixed.

The first failure was observed locally as:

Method invocation failed because [System.IO.Path] does not contain a method named 'GetRelativePath'.

The new Windows PowerShell 5.1 regression job then exposed the newline mismatch, allowing both compatibility defects to be fixed before publication.

Fix

  • replaces all three Path.GetRelativePath calls with a repository-local Get-RepositoryRelativePath helper built from APIs available in Windows PowerShell 5.1;
  • preserves repository-boundary validation and slash-normalized relative paths;
  • normalizes generated expected header templates to LF before exact comparison, matching the existing normalization of repository file contents;
  • does not alter license templates, project classification, stable API, package metadata, or runtime behavior.

Regression coverage

The Windows PR runtime job now explicitly runs:

shell: powershell
run: ./packaging/VerifyLicenseHeaders.ps1

before the existing PowerShell 7 runtime validation. This makes Windows PowerShell 5.1 compatibility an enforced PR contract rather than relying on pwsh-only hosted validation.

On exact head e49a8b72646551925310b0b0854f822e8e030a72, workflow #978 (34200260312) has already passed the explicit Verify license headers under Windows PowerShell 5.1 step. The remaining normal runtime/package jobs continue to validate the unchanged stable 1.0 package/API contracts.

This PR is a pre-publication build/validation compatibility fix for stable 1.0.0; it contains no product-source or API changes.

@uniblab
uniblab merged commit 8264d6d into main Sep 8, 2026
9 checks passed
@uniblab
uniblab deleted the 1.0.0-powershell51-validation-fix branch September 8, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant